Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's storage.sync. I get a warning about it too, but just ignored it so far. I think it's just the actual sync that doesn't work (settings still get set and loaded locally).


Okay, I pulled out the code and ran it on Firefox again to jog my memory. This is the error when doing anything with chrome.storage.sync:

  Error: The storage API will not work with a temporary addon ID. Please add an explicit addon ID to your manifest. For more information see https://bugzil.la/1323228.
It's an error, not a warning, and set/get definitely don't work.

If I replace all storage.sync invocations with storage.local then it's okay, not error/warning, and setting/getting seems to work.

So the problem is limited to storage.sync, but it's not just a warning.

Edit: now that I googled the problem again, it seems adding an explicit addon ID according to https://extensionworkshop.com/documentation/develop/extensio... should work. I don't recall what I did back then, but I definitely did quite a few things to no avail.


Hmm I checked and I also have this bit of code I added a while ago to the manifest for non-release builds [0]: browser_specific_settings = {'gecko': {'id': 'promnesia@karlicoss.github.com'} } Maybe this is what makes it just a warning (still not sure why it warns!).

[0] https://github.com/karlicoss/promnesia/blob/b9e59262b2fc51ef...

Definitely agree that the docs could be improved on web extension development & testing in general, I often feel the whole ecosystem is a bit hostile.


> browser_specific_settings

Yeah I noticed that's the answer when I googled the error just now. Not sure why I didn't see it or it somehow didn't work at that time, the information should have been available (I encountered the problem late last year).

It's certainly misleading that the error message links to a bug, at least giving the impression that it is a bug, rather than a guide.

That said, IMO the underlying issue that Firefox doesn't allow you to just install an extension from a source directory like Chrome/Chromium does is much worse.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: