On Linux, I try to run the example extension at: https://github.com/mdn/webextensions-examples/tree/main/favourite-colour
Followed https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location and created file:
~/.mozilla/managed-storage/favourite-colour-examples@mozilla.org.json
But when running with web-ext run -f deved --devtools
, the developer tools’s console still logs the error:
Uncaught (in promise) Error: Managed storage manifest not found
How do I get the feature storage.managed
to work? Thank you.
1 Like
I think I’ve found the problem.
webextensions-examples-main/favourite-colour/manifest.json
"browser_specific_settings": {
"gecko": {
"id": "favourite-colour-examples@mozilla.org",
"strict_min_version": "57.0a1"
}
}
British spelling of color/colour in:
"id": "favourite-colour-examples@mozilla.org"
webextensions-examples-main/favourite-colour/README.md
{
"name": "favourite-colour-examples@mozilla.org",
"description": "ignored",
"type": "storage",
"data": {
"colour": "management thinks it should be blue!"
}
}
British spelling of color/colour in:
"name": "favourite-colour-examples@mozilla.org"
"colour": "management thinks it should be blue!"
Native manifests > Managed storage manifests
{
"name": "favourite-color-examples@mozilla.org",
"description": "ignored",
"type": "storage",
"data": {
"color": "management thinks it should be blue!"
}
}
American spelling of color/colour in:
“name”: “favourite-color-examples@mozilla.org”
“color”: “management thinks it should be blue!”
On Github, both the extension and the example file where I copied (favourite-colour-examples@mozilla.org.json
) use British spelling so I don’t think that’s the problem.
But I will try to convert all of them into American spelling and see, thank you.
Edit: that indeed works! But I don’t understand! The said example extension doesn’t contain a single “color” word.