4

I have a sticky note app on the Chrome Store which uses the localStorage object to remember notes. It seems to work fine, but every time I push out an update, people report that they've lost all their notes. This has never happened to me, not even once.

How could I go about troubleshooting this, if I can't even duplicate it?

8
  • 2
    Is it a packaged app or extension, or a hosted app?
    – Kinlan
    Commented Apr 12, 2012 at 17:36
  • you could try only using the background page localStorage, using message passing to get and set values. You could also try running an instance of canary, because it's completely separated from normal chrome - so it would receive a native update push like your users. Commented Apr 12, 2012 at 17:58
  • Lastly, and this is probably the best thing you can do, is start a facebook beta users group, and then you can actually directly response to issues. Docs on message passing, so you can use the background page's localStorage: code.google.com/chrome/extensions/messaging.html Also, you could test to see if C-Cleaner is the culprit: piriform.com/ccleaner Commented Apr 12, 2012 at 18:00
  • @DevinGRhode thanks for the suggestions. The app's localStorage access is on the page itself; I'll have to try moving that logic to the background page instead.
    – wavetree
    Commented Apr 12, 2012 at 20:26
  • yeah, come to think of it, the page can be clearing the localStorage too. Commented Apr 13, 2012 at 0:44

1 Answer 1

2

How are you sending out updates? It's possible that the problem is that the app ID is changing. To see if this is the case, modify the app to somehow report the value of chrome.runtime.id and have it sent back to you.

If this is the case, you can fix the ID by including a key property in your manifest.json. To get the value of the key property, install the app by dragging a CRX file to the Extensions page or from the Chrome Web Store and find the INSTALLED manifest.json file. (There is a doc on where to find it... don't recall the URL but you can Google for it.) Then copy the key property to your source manifest.json file.

UPDATE: Found the link. http://developer.chrome.com/apps/manifest/key.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.