# I can't set the ID for the extension

**URL:** <https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222>\
**Category:** Development\
**Tags:** issue\
**Created:** [July 26, 2024, 8:21pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222 "2024-07-26T20:21:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![savelijln0](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@savelijln0](https://discourse.mozilla.org/u/savelijln0)\
**Post date:** [July 26, 2024, 8:21pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/1 "2024-07-26T20:21:11Z")

</div>

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

 ![изображение](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/b/0/b03137cc9d67cc07f4c5933d268c9b8c2ee76728.png)  
 ![изображение](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/4/6/46414c1fa20e0b202f87f076fd4468a086da915e.png)

---

<div class="post-metadata">

**Author:** ![hans\_squared](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/hans_squared/32/67424_2.png) [@hans\_squared](https://discourse.mozilla.org/u/hans_squared)\
**Post date:** [July 27, 2024, 11:30am UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/2 "2024-07-27T11:30:03Z")

</div>

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](mailto: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](https://discourse.mozilla.org/t/email-is-displayed-by-default-for-the-new-account/92266)

---

<div class="post-metadata">

**Author:** ![savelijln0](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@savelijln0](https://discourse.mozilla.org/u/savelijln0)\
**Post date:** [July 27, 2024, 12:19pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/3 "2024-07-27T12:19:08Z")

</div>

Sure, here it is:

```auto
        {
      "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.)

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [July 27, 2024, 1:10pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/4 "2024-07-27T13:10:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![savelijln0](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@savelijln0](https://discourse.mozilla.org/u/savelijln0)\
**Post date:** [July 27, 2024, 6:22pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/5 "2024-07-27T18:22:33Z")

</div>

After restarting the extension, all I get is:

```auto
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.

```

 ![image](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/d/d/ddd7615f06506115370e183428801a5b08a86893.png)

If I delete and install the extension, love will only have the last 2 lines from addons.webextension about background.service\_worker

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [July 27, 2024, 6:59pm UTC](https://discourse.mozilla.org/t/i-cant-set-the-id-for-the-extension/134222/6 "2024-07-27T18:59:00Z")

</div>

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 🙂
