question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

localStorage wiped on 0.12.3 upgrade and subsequent app launches

See original GitHub issue

I’ve just started testing my app with 0.14.5 instead of 0.12.3. On first launch, all my app’s settings in localStorage were wiped. (Similar to #4527, except not using an app:// protocol. Just referencing localStorage). I thought maybe this was a migration bug, but it also seems that localStorage is wiped for each app launch. Are there any oddities with localStorage that could explain this, or any known workarounds?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
orthercommented, Jun 2, 2016

I have a theory that this is NOT an issue with 0.14.5 migrating data from old versions but instead a result of running the old 0.12.3 nw.js version of the app AFTER running the new 0.14.5 version. Since the user data files have been moved to the new location after running the 0.14.5 version, the 0.12.3 version will start and create new empty localStorage/IndexedDB files. If the 0.14.5 version is ran after that the newly created empty localStorage/IndexedDB files from the 0.12.3 version are copied OVER the existing 0.14.5 versions. This results in empty localStorage/IndexedDB.

After testing this theory a few times I believe it to be the cause. This would explain why the behavior seemed inconsistent. If this is the case, a user can wipe their data by running the old version of the app which is scary.

0reactions
rogerwangcommented, Jun 11, 2016

To all people who have issues: please upload a sample with user data dir of 0.12 so I can reproduce it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local storage data getting deleted… | Apple Developer Forums
Hi Team, We are using following different concepts for storing the users data in the device in our hybrid mobile application and even...
Read more >
Does localStorage in Javascript get wiped off after clearing ...
Yes localstorage does get cleared when browser data is removed. Save a URL as a string on the mobile device somewhere which always...
Read more >
Changelog - Cypress Documentation
Whether enabled or disabled, this changes how Cypress cleans up the browser context before each test and you may experience test errors with...
Read more >
LocalStorage, sessionStorage - The Modern JavaScript Tutorial
Web storage objects localStorage and sessionStorage allow to save key/value pairs in the browser. ... We'll see that later in this chapter.
Read more >
Window.localStorage - Web APIs | MDN
( localStorage data for a document loaded in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found