Home / GitHub Page

Unhandled promise rejection Promise

Hi all,

I installed joplin via yay -S joplin in my Manjaro + i3. The desktop app works very well, but the terminal close and it shows this message:

> joplin
Unhandled promise rejection Promise {
  <rejected> TypeError: Cannot read property 'size' of null
      at Function.autoSetFileSize (/usr/share/joplin-cli/lib/services/ResourceService.js:117:55) } reason: TypeError: Cannot read property 'size' of null
    at Function.autoSetFileSize (/usr/share/joplin-cli/lib/services/ResourceService.js:117:55)

I installed joplin via npm and the problem happens.

Desktop version: 1.0.152 (prod, linux).
Terminal version is: 1.0.126 (prod).

I just installed the latest version via npm and I don’t receive this error. Can you please update to the latest cli version 1.0.135.

@tessus, thanks!

I installed the 1.0.135 version via npm but the problem keep happens.

Hmm, very strange. Maybe you hit a certain code path that I don’t, which also seems a bit strange. I’m running the terminal app on Linux and macOS - both with node v10.15.3.

@laurent why would above error show up? Has it to do with data migration or table adjustment for a new internal db version?

my node and npm version:

$ node --version                                                                                                                                                                                                                         
v11.15.0
$ npm --version
6.9.0

Could you try with the latest version 1.0.136?

@laurent, I tried now doing the same installation steps via npm.

NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin
$ npm -g install joplin
/home/roney/.npm-global/bin/joplin -> /home/roney/.npm-global/lib/node_modules/joplin/main.js
+ joplin@1.0.136
updated 3 packages in 5.816s
$ j
Unhandled promise rejection Promise {
  <rejected> TypeError: this.logger is not a function
      at Function.autoSetFileSize (/home/roney/.joplin-bin/lib/node_modules/joplin/lib/services/ResourceService.js:117:9) } reason: TypeError: this.logger is not a function
    at Function.autoSetFileSize (/home/roney/.joplin-bin/lib/node_modules/joplin/lib/services/ResourceService.js:117:9)

Where j is a shortcut to joplin.

Ok I should have tested the error condition. v137 should work

@laurent, I updated the Joplin CLI in my mac to 1.0.135, via homebew, and the same error occurred.

The fix was created after 1.0.135. The latest CLI version is 1.0.137. brew is always behind. Not sure why people would use brew in the first place, since it does nothing more than npm install -g joplin

@tessus, in the mac I installed Joplin CLI 1.0.137 via npm. The app does not close with error message. Thanks.

But the order of the notebook are reverse,


there is a command to put the notebooks in alphabetic order?

Yep: :config folders.sortOrder.field = title

Sorry, I also forgot this:

folders.sortOrder.reverse = false

This new command is wonderful!

I’m glad everything works now.