Boostnote: Boost note suddenly stopped working with Dropbox

Created on 5 Jun 2018  路  4Comments  路  Source: BoostIO/Boostnote

Current behavior

Notes not loading even after linking back using dropbox

image

After adding the 'Unnamed' folder from dropbox

image

Expected behavior

Should list all my previous notes

Steps to reproduce

Not sure if connected, but the last thing I did was to load my notes via mobile (same dropbox folder). Then everything stopped working.

  1. Load notes via mobile
  2. Go to desktop app and try to use it
  3. Should not see notes
  4. Reinstalled with latest version of Desktop app
  5. Still no notes

Environment

  • Version : 0.11.5
  • OS Version and name : OSX El Capitan 10.11.6
bug

Most helpful comment

The trace:

Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
    at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3595:19
    at Array.some (native)
    at data (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3567:21)
    at file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:5926
    at s (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:1820)
    at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:55444:10
    at <anonymous>:null:null

Upon further investigation, it seems to error on this bit:

            note.tags.forEach(function (tag) {
              var tagNoteList = state.tagNoteMap.get(tag);
              if (tagNoteList == null) {
                tagNoteList = new _Mutable.Set(tagNoteList);
                state.tagNoteMap.set(tag, tagNoteList);
              }
              tagNoteList.add(uniqueKey);
            });

so tags is undefined for one of the notes?

More edits:

  • So I did a grep on all the notes in the folder and all tags have a value of [] (because I don't use them).

  • I should have searched for notes WITHOUT tags in them and I found some:

Apps/boostnote-mobile $ grep -L "tags" notes/**/*.cson
notes/87909490a31bb6aa869f.cson
Apps/boostnote-mobile $ cat notes/87909490a31bb6aa869f.cson
'content': ''

Deleted that file and my notes loaded properly!

All 4 comments

The trace:

Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
    at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3595:19
    at Array.some (native)
    at data (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3567:21)
    at file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:5926
    at s (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/redux/dist/redux.min.js:1:1820)
    at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:55444:10
    at <anonymous>:null:null

Upon further investigation, it seems to error on this bit:

            note.tags.forEach(function (tag) {
              var tagNoteList = state.tagNoteMap.get(tag);
              if (tagNoteList == null) {
                tagNoteList = new _Mutable.Set(tagNoteList);
                state.tagNoteMap.set(tag, tagNoteList);
              }
              tagNoteList.add(uniqueKey);
            });

so tags is undefined for one of the notes?

More edits:

  • So I did a grep on all the notes in the folder and all tags have a value of [] (because I don't use them).

  • I should have searched for notes WITHOUT tags in them and I found some:

Apps/boostnote-mobile $ grep -L "tags" notes/**/*.cson
notes/87909490a31bb6aa869f.cson
Apps/boostnote-mobile $ cat notes/87909490a31bb6aa869f.cson
'content': ''

Deleted that file and my notes loaded properly!

I guess we can have a guard clause for when the tags is not included in the notes? I would assume that this happened somehow from my mobile app or something. Not sure how to replicate a note with no tags and just blank content, but maybe just a guard clause like

if (note == undefined || note.tags == undefined) // pseudocode  {
  return
} 

note.tags.forEach ....

just a suggestion. I don't have much knowledge with Electron to make a PR for this.

Thank you @corroded!

The current version of Boostnote seems to work with Dropbox.

Please feel free to reopen this issue if you are still experiencing it.

Was this page helpful?
0 / 5 - 0 ratings