Is it possible to test storage.sync in development?

As the title states I’m wondering if it’s possible to use sync storage for an extension in development.

I tried signing the extension via addons.mozilla.org and installing it on two different devices, but the data did not appear to sync. about:debugging in each browser shows they have different IDs. In the manifest, I have specified browser_specific_settings with a unique email-like id.

Is syncing only possible if you publish the extension publicly on addons.mozilla.org? Surely this is not true since presumably I can self-distribute an addon and still use sync storage.

It will work during development, however there are some limitations of Firefox Sync engine:

  • you need to be logged in your account on all your devices (obviously)

  • you need to enable “Add-ons” synchronization - in the Firefox Options page (“about:preferences#sync”)

  • it won’t work in Android - you will be able to store data, but they will NOT get synchronized

  • it’s not instant - it’s actually really slow as it can take several minutes to synchronize data. If you want to be sure your data are synchronized, press the Sync Now button in your Firefox Account toolbar icon

  • it can handle only 100kb of data

2 Likes

Ah, I just realized, I think I am logged into different accounts! head slap

Thank you for writing all this out. I did not know it won’t work in android! Hopefully that is coming with the development of Firefox Preview.

I recently tried my extension-in-development with Kiwi Browser (allows installs from the Chrome store), and it nearly works, except for the options page. Maybe soon extensions can finally be used on mobile in Firefox/Chromium-based browsers.

1 Like

To clarify here, I ended up installing the signed add-on manually on each Firefox instance, and then clicked “Sync now” on each one to test that syncing works, which it does (apparently having different UUIDs does not impact syncing).

Yes the UUID changes every time you install addon, even if you reinstall the same one.

1 Like