BoostNote-Legacy icon indicating copy to clipboard operation
BoostNote-Legacy copied to clipboard

Storages are missing at startup

Open sahilseth opened this issue 8 years ago • 19 comments

Each time I start boostnote on this machine - the configured storages are gone, and have to be added again.

Interestingly, on a different machine storages stay, and don't need to be reconfigured.

screen shot 2018-03-25 at 7 35 17 pm

sahilseth avatar Mar 26 '18 00:03 sahilseth

It seems you moved the directory without unlink.

Please run localStorage.clear() in the console and restart the app. :)

Rokt33r avatar Mar 26 '18 02:03 Rokt33r

And, I assume we have to handle this error.

Rokt33r avatar Mar 26 '18 02:03 Rokt33r

Having the same issue; can add new folders as storage, but can't re-add any of my old ones. screen shot 2018-03-31 at 9 49 12 pm screen shot 2018-03-31 at 9 53 28 pm

chufnagel avatar Apr 01 '18 01:04 chufnagel

I've run across the same bug. I've been using boostnote for a while and haven't run into this before. I had boostnote open but at some point it must have crashed. When I re-loaded the storage was no longer mounted. I can't see to get any storage to stay mounted across restarts. if I run localStorage.clear() as suggested, the default storage gets mounted but thats also lost across restarts. boostnote

Karrade7 avatar Apr 01 '18 09:04 Karrade7

@chufnagel @Karrade7 Enter localStorage.clear() to the console and refresh the app.

Rokt33r avatar Apr 01 '18 09:04 Rokt33r

One more datapoint. When i try to re-add my originally created stprage mount which contains a boosnote.json file and a lot of notes I an uncaught error: main.js:3656 Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined at file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3656:19 at Array.forEach (native) at data (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:3633: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:61491:10 at :null:null

boostnote-error2

Karrade7 avatar Apr 01 '18 09:04 Karrade7

@Rokt33r Thanks for your fast response. I tried localStorage.clear() but I got an undefined response. I also tried downgrading to the previous version and then upgrading. When I did that storage returned. However when I loaded my previous notes the storage disappeared. I'm guessing something is written to notes that is crashing.

Screen of undefined below. undefined

Karrade7 avatar Apr 01 '18 17:04 Karrade7

BTW - this is what happens when I add a new storage.

new storage

Karrade7 avatar Apr 01 '18 17:04 Karrade7

Did you refresh the app?

Rokt33r avatar Apr 02 '18 05:04 Rokt33r

@Rokt33r . When you say refresh the app, do you mean something besides restarting it? I restarted it.

I think I found one of the issues though. There are some oddities in in the data being written. One of the items that is fatal is that there is a note only with the following content:

'content': ''

When I add this to notes directory, boost note crashes. I don't know what created it, but its creation date is from a day ago when I first had the issue. That's not the only issue. When I copy all my other notes back storage disappears again so some other note is fault. I'll have to go through them.

A few other oddities I noticed. I don't know if these are related: Boostnote.json has an odd folder entry that has no key.

    {
      "color": "#E10051",
      "name": "Unknown 1"
    }

Some of my notes now have much longer file names. Example: f7581908-8dd4-4637-86bd-e79939fad076.cson

But older notes have shorter filenames: 97f6ad41d8a6ba4a6aa5.cson

I will keep looking for the errant notes causing the crash.

BTW - I really love boostnote, so I'm happy to help as best as I can.

Karrade7 avatar Apr 02 '18 19:04 Karrade7

Update: I found two files with only the content field and it being empty as referenced above and here: 'content': ''

When I removed those files and copied my notes back everything loaded. I'll look through my backups to see if there was real data in these notes that got overridden, but at minimum seems like there is a bug around better handling of malformed note files and potentially a bug creating these notes in the first place.

Karrade7 avatar Apr 02 '18 20:04 Karrade7

I may have also been impacted while reporting issue #1763 , but I do not have any logs or reproduction steps (as I did not do a deep dive on it).

I do recognize some of these errors here, and it was occurring when I was attempting to move notes between folders in the same storage and folders between storage locations.

urda avatar Apr 02 '18 22:04 urda

Other than that I do not have any notes to report. If I can reproduce my (possibly this) storage issue again I'll have a full write up ready.

urda avatar Apr 02 '18 22:04 urda

Sorry, I just typed wrong PR number.

bimlas avatar Apr 26 '18 20:04 bimlas

@sahilseth @urda Is this issue still present in the current version of Boostnote?

Flexo013 avatar Jul 28 '19 18:07 Flexo013

@Flexo013 I actually stopped using Boostnote for production uses at this time.

urda avatar Jul 29 '19 17:07 urda

Understandable.

I will close this issue for now since there is nobody who can reproduce it.

Flexo013 avatar Jul 30 '19 09:07 Flexo013

I tihnk my files were Local - I ran the localStorage.clear() Does this mean my notes are completely lost

eccelm avatar Oct 15 '20 18:10 eccelm

@eccelm I'm not entirely sure as to what that function does, but I suspect that you indeed cleared all your local storages... :(

Flexo013 avatar Oct 24 '20 11:10 Flexo013