I started writing my extension for one site, but I can’t make it with a permanent ID in any way. So that I don’t specify in field browser_specific_settings.gecko.id I always get the error “This Web Extension has a temporary ID”. I have already tried to run an example of extension where gecko.id already written and should work fine but even for them I get this error. I also tried to generate an ID using a template, but it also did not give results. At the moment, I’m not quite experienced in Firefox yet, so I apologize if I’m slowing down somewhere
The error message reports a problem with the “background” key.
Can you post the entire manifest.json ?
(Please post it as text. You can preserve the indentation with the </> icon or Ctrl-Shift-C. Also, please replace your e-mail address in manifest.json with nospam@gmail.com, so spambots can’t harvest it - I don’t know if spambots can read e-mail addresses in images, but just to be on the safe side, I’d black them out, too.)
On an unrelated note:
Your post shows your e-mail address, but you can remove it in your Profile.
This is a known problem: Email is displayed by default for the new account
Sure, here it is:
{
"name": "Journal UI",
"description": "This extension will load a Re-Designed page to Journal site and some features that can make your life easier",
"version": "0.1.5",
"author": "savelijln0@gmail.com",
"manifest_version": 3,
"browser_specific_settings": {
"gecko": {
"id": "savelijln0@gmail.com"
}
},
"permissions": [
"storage",
"declarativeNetRequest",
"declarativeNetRequestWithHostAccess",
"declarativeNetRequestFeedback"
],
"background": {
"service_worker": "libraries/background.js",
"scripts": ["libraries/background.js"]
},
"icons": {
"128": "JournalUI_128x128.png"
},
"content_scripts": [
{
"js": ["contentjs/allLoader.js", "contentjs/UserCollection.js"],
"matches": ["https://journal.top-academy.ru/*"]
}
],
"web_accessible_resources": [
{
"resources": [
"js/DocToast.js",
"js/cssInjector.js",
"js/SettingsAndServices.js",
"js/settingsCompatibilityChecker.js",
"js/askDialog.js",
"js/JWTRefresher.js",
"js/toastService.js",
"js/wallpaperParser.js",
"libraries/values.js",
"libraries/encryptionLibrary.js",
"libraries/easyLocalStorage.js",
"libraries/fetcher.js",
"libraries/smoothMouse.js",
"libraries/listenersAndServices.js"
],
"matches": ["https://journal.top-academy.ru/*"]
}
],
"action": {
"default_popup": "FastSettings.html",
"default_icon" : "JournalUI_128x128.png"
}
}
I know that “service_worker” is not supported, its for chrome. Also, if i delete service_worker key this will not give a result (even if i delete all background keys). Thanks
(And to be honest, I don’t care about spam on my mail.)
When pasting code here, place triple backticks (```) on the line above and below the code, that will activate code format.
Also note that the “error” is actually a warning , so it won’t break the addon.
To get the name of the unexpected manifest key, I think you need to open Browser console (Ctrl + Shift + J), it should be written there when you load (or reload?) the addon.
After restarting the extension, all I get is:
1722103894807 addons.webextension.savelijln0@gmail.com WARN Loading extension 'savelijln0@gmail.com': Reading manifest: Warning processing background.service_worker: An unexpected property was found in the WebExtension manifest.
1722103894808 addons.xpi WARN Addon with ID savelijln0@gmail.com already installed, older version will be disabled
1722103894816 addons.webextension.savelijln0@gmail.com WARN Loading extension 'savelijln0@gmail.com': Reading manifest: Warning processing background.service_worker: An unexpected property was found in the WebExtension manifest.
1722103894818 addons.webextension.savelijln0@gmail.com WARN Loading extension 'savelijln0@gmail.com': Reading manifest: Warning processing background.service_worker: An unexpected property was found in the WebExtension manifest.
If I delete and install the extension, love will only have the last 2 lines from addons.webextension about background.service_worker
As expected, it’s all OK.
It’s there to warn developers porting Chrome extension into Firefox that the service_worker
key is not supported (although it should mention it specifically in the warning message).
But you need to list both service_worker
and scripts
if you want to use the same manifest for both stores. So all is fine