fritter icon indicating copy to clipboard operation
fritter copied to clipboard

Lately fritter often is asking to create / select profile

Open Gozala opened this issue 7 years ago • 7 comments

From what I can tell it's always after I had to kill beaker (but that is most of the time, so may or may not be related). I suspect that indexdb get's wiped or something (will take a look next time it happens).

Gozala avatar Oct 03 '18 17:10 Gozala

@Gozala have you been using the electron3 branch? That'll cause that. Electron3 makes backwards incompatible changes to the user data directory.

pfrazee avatar Oct 03 '18 18:10 pfrazee

@Gozala have you been using the electron3 branch? That'll cause that. Electron3 makes backwards incompatible changes to the user data directory.

No I'm just using v0.8.0-prerelease.9

Gozala avatar Oct 03 '18 18:10 Gozala

Huh okay. Well it is possible that indexeddb is getting wiped with kills. Might be why kills are necessary, something getting into a bad state.

pfrazee avatar Oct 03 '18 18:10 pfrazee

Just run into this again, but localStorage seems to have "notificationsLastReadTS" "settings" and indexDB seems to have ton of records as well. So it must be something else.

Gozala avatar Oct 03 '18 20:10 Gozala

Ok it seems issue is that userUrl is not in localStorage

https://github.com/beakerbrowser/fritter/blob/269b81b3a0b66eb62eda4681c24d6885948dae04/lib/app.js#L89

Which is surprising (meaning why would that record be deleted). Looking at the source I see two cases where it's being set:

https://github.com/beakerbrowser/fritter/blob/269b81b3a0b66eb62eda4681c24d6885948dae04/lib/app.js#L496

Which is from what I can tell when you create / select a user.

And second instance is on failedToLoadUser: https://github.com/beakerbrowser/fritter/blob/269b81b3a0b66eb62eda4681c24d6885948dae04/lib/app.js#L115-L119

Which seem like it can happen here:

https://github.com/beakerbrowser/fritter/blob/269b81b3a0b66eb62eda4681c24d6885948dae04/lib/app.js#L92-L100

Either if loading archive info failed or something in libfritter did. Given that sometimes loading archive can timeout I'm starting to suspect that loading my profile times-out and which in turns removes the record from the localStorage, which makes me wonder if that is a good idea. Maybe it would make more sense to show timeout error and allow reload instead.

Gozala avatar Oct 03 '18 20:10 Gozala

@Gozala Okay that makes sense. 250ms is pretty short when it could be under load, and definitely shouldnt trigger the undo logic.

pfrazee avatar Oct 03 '18 20:10 pfrazee

Is this solved or do you need anyone to fix this? Would be happy to help whereever I can!

pujux avatar Oct 05 '18 09:10 pujux