Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

UnhandledPromiseRejectionWarning #163

Closed
ghost opened this issue Mar 27, 2017 · 14 comments
Closed

UnhandledPromiseRejectionWarning #163

ghost opened this issue Mar 27, 2017 · 14 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 27, 2017

Abricotine (0.5.0) used to work for several days. It broke today. I did not made any changes, neither to my system nor to Abricotine. (Linux Mint 18.1 Cinnamon, everything up-to-date)

When starting it from the start menu, nothing will happen (the process will start, but you do not see anything.) When starting it from the terminal the following error will be displayed:

(node:20999) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Error processing argument at index 0, conversion failure from #
(node:20999) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Removing Abricotine and its configuration (purge) and reinstalling it, does not change anything.
Bottom line: It is unusable...

@brrd brrd added the bug label Mar 28, 2017
@brrd
Copy link
Owner

brrd commented Mar 28, 2017

Did you try running Abricotine --reset from your terminal?
What is the build of Abricotine you are using?
Is the version 0.4.0 still working?

@ghost
Copy link
Author

ghost commented Mar 28, 2017

Thanks for your prompt reply.
After running Abricotine --reset I can use it again (0.5.0 version). Great, because I love it :)
But I still think there is a bug. I did not mention this in my first post: It already happened twice (same error). The first time, I could fix it by un- and re-installing it. This time, this didn't work. but --reset did.
Every time I could use it for several days without any problems.

I use the deb-package from the release section (https://github.com/brrd/Abricotine/releases/download/0.5.0/Abricotine-linux-ubuntu-debian-x64.deb).

Another hint that might help you: This time the error occurred, when Abricotine was open and I opened another md-file (using nemo in Linux Mint, Abricotine is set as default for Markdown files). I could see the error message in a gui-window. I closed Abricotine and tried to open it again, but then the gui would not show up any more and I tried the terminal where I got the error message.

@brrd
Copy link
Owner

brrd commented Mar 28, 2017

OK, good, and thank you for this information.
The next time this problem occurs, would you mind submitting an archive of your config directory in this thread? You can access it through the "Edit" menu.

@brrd brrd added the need info label Mar 28, 2017
@ghost
Copy link
Author

ghost commented Mar 28, 2017

Sure, I will upload the config directory if it occurs again (I hope it doesn't...).
What came to my mind: What does 'Abricotine --reset' do that removing (including the config files 'apt-get remove --purge') and reinstalling does not?

@brrd
Copy link
Owner

brrd commented Mar 28, 2017

--reset overrides the user config with the defaults.
apt-get --purge is supposed to remove conffiles in /etc, not user specific config files.

@brrd
Copy link
Owner

brrd commented Mar 28, 2017

Sure, I will upload the config directory if it occurs again (I hope it doesn't...).

I hope it will, so we could understand the issue and fix it once and for all 😉

@ghost
Copy link
Author

ghost commented Mar 29, 2017

--reset overrides the user config with the defaults.
apt-get --purge is supposed to remove conffiles in /etc, not user specific config files.

What do you mean with user specific config files? '~/.config/Abricotine/app' ? Because this directory did not exist any more after the removal.

@brrd
Copy link
Owner

brrd commented Mar 29, 2017

What do you mean with user specific config files? '~/.config/Abricotine/app' ?

Yes.

Because this directory did not exist any more after the removal.

Well, I guess it shouldn't, but the .deb is generated using electron-installer-debian and I don't know how this lib is working in detail...

The thing I don't understand now is why --reset solved your issue while apt-get --purge didin't work.
It requires more investigation...

@ghost
Copy link
Author

ghost commented Mar 29, 2017

It requires more investigation...

I will post more information, if it happens again.

@ghost
Copy link
Author

ghost commented Apr 28, 2017

Finally, it happened again.

As described earlier, I didn't see the Gui anymore. After killing the process and restarting Abricotine from the terminal I got the same error:

(node:9871) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

What happened before:
A. was running perfectly, I closed Abricotine and closed the screen of my notebook. Despite Linux Mint being set to not doing anything on closing the screen, it went on standby. Again, Abricotine was NOT running at that time. After reawakening the computer, Abricotine did not work when I tried to open a md file.

I performed a reset Abricotine --reset and now everything is working again. I saved the config-directory before reseting it (~/.config/Abricotine/app) and will append the folder. (The folder does also include my own templates. So everything should be the way it was when A. failed to start.)

app.zip

Hope this helps

@ghost
Copy link
Author

ghost commented Apr 28, 2017

Addendum: I used Abricotine almost everyday since I reported the error the last time. This is the first the error reoccurred.

@brrd
Copy link
Owner

brrd commented Apr 28, 2017

I got it!
This error is actually coming from the electron-window-state module, as described in mawie81/electron-window-state#15
This issue has been fixed few month ago, so we just need to update this module to the latest version.

Before the next release of Abricotine if it happens to you again, then you can just delete the file .config/Abricotine/window-state.json (which i maybe easier than using --reset and reinstalling your themes).

Thank you for sending your app.zip, it was really useful for understanding the cause of this issue!

@brrd brrd removed the need info label Apr 28, 2017
@ghost
Copy link
Author

ghost commented Apr 28, 2017

Great. I am looking forward to the next release of Abricotine.

@Mottotime
Copy link

The path is .config/Abricotine/app/window-state.json for me with Abricotine 0.5.0 using Abricotine-linux-ubuntu-debian-x64.deb on Ubuntu 16.04.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants