Yeah, it is exactly this window. I just tested the whole procedure on another device with another OS now. It is the same problem there. My source code is on GitHub, so maybe someone can find the problem
Try to use fresh profile using the web-ext
tool:
Just install it with:
npm install --global web-ext
And then go to the folder with your addon source code (where the manifest.json is) and run:
web-ext run
It will open fresh temp Firefox with fresh profile, so everything should work there . And if it does, then there is something wrong with your normal profile.
Well, I just checked this out. I have the exactly same problem here: The console output says that the entry was set, but the storage inspector remains empty. The toggle button in the upper right is not there too.
Can you attach the current version of your add-on to your reply (as a zip file)?
The one on Github seems to be outdated; it doesnât use the storage API at all, for example.
The current version can be downloaded from this branch
Itâs a bug in Firefox.
- If the extension doesnât have a background script, then storage items are never visible in Web Storage.
- If the extension has a background script:
2a) If you set the storage item and then click on Web Storage -> Extension Storage, the item is shown.
2b) If you click on Web Storage -> Extension Storage and then set the storage item, the item is not shown.
Clearing storage doesnât work correctly, either.
Right-click on your extensionâs storage, and click âClear Allâ.
Then click on âExtension Storageâ and on your extensionâs storage again.
The key/value pair is there again.
Clicking âReload Entriesâ (the circular arrow) doesnât do anything.
I vaguely remember reading somewhere that problems in the debugging tools are to be expected, because Mozilla doesnât have enough employees to fix them and has prioritized other areas. I donât know if it was from an offical source, it might have been a comment on https://blog.mozilla.org/addons/
Never mind, this was actually confirmed in the original question.
Running the following in the Inspectorâs Console for the background page dumps the localStorage object for that context, but I donât know whether it will work in the no-background scenario:
var ls = browser.storage.local.get();
ls.then(o => {console.log(o)});
Itâs working this way, thanks so much!