-
Notifications
You must be signed in to change notification settings - Fork 148
Add instructions on finding the ID of an existing extension #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Rob--W
wants to merge
1
commit into
master
Choose a base branch
from
existing-addon-id
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+12
−6
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,11 +25,10 @@ contributors: | |||||
| djbrown, | ||||||
| kirinokirino, | ||||||
| dotproto, | ||||||
| andrewbaxter, | ||||||
| dotproto | ||||||
| andrewbaxter | ||||||
| ] | ||||||
| last_updated_by: dotproto | ||||||
| date: 2025-10-29 | ||||||
| last_updated_by: Rob--W | ||||||
| date: 2026-01-05 | ||||||
| --- | ||||||
|
|
||||||
| <!-- Page Hero Banner --> | ||||||
|
|
@@ -96,6 +95,8 @@ You need to set an ID in your extensions manifest.json file when: | |||||
|
|
||||||
| See [`browser_specific_settings` in manifest.json](https://developer.mozilla.org/Add-ons/WebExtensions/manifest.json/browser_specific_settings) for the syntax of setting the extension ID. | ||||||
|
|
||||||
| To find the ID for an extension that has already been published, install your existing extension from AMO, visit `about:debugging` and look at the `Extension ID` field of your extension. | ||||||
|
|
||||||
| {% endcapture %} | ||||||
| {% include modules/one-column.liquid, | ||||||
| id: "how-do-i-set-an-add-on-id" | ||||||
|
|
@@ -110,26 +111,31 @@ See [`browser_specific_settings` in manifest.json](https://developer.mozilla.org | |||||
|
|
||||||
| ## Working without an ID in Manifest V2 | ||||||
|
|
||||||
| An add-on ID is optional for Manifest V2 extensions. If you don't set it, you can generally develop, debug, publish, and update your extension without ever having to deal with an ID. However, if you do add the `browser_specific_settings` manifest key (to add an ID), Google Chrome ignores it, and Apple Safari ignores Firefox's `gecko` and `gecko_android` sub-keys. | ||||||
| An add-on ID is optional for Manifest V2 extensions. If you don't set it, you can generally develop, debug, publish, and update your extension without ever having to deal with an ID. If you do add the `browser_specific_settings` manifest key (to add an ID), Google Chrome ignores it, and Apple Safari ignores Firefox's `gecko` and `gecko_android` sub-keys. | ||||||
|
|
||||||
| However, there are some implications of not setting an add-on ID that are described in this section. | ||||||
|
|
||||||
| ### Developing and debugging | ||||||
|
|
||||||
| If your manifest.json does not contain an ID, the extension is assigned a randomly-generated temporary ID when you [install it in Firefox](/documentation/develop/temporary-installation-in-firefox/) through `about:debugging`. If you then reload the extension using the "Reload" button, the same ID is used. If you restart Firefox and load the add-on again, it gets a new ID. This affects the APIs listed in [Development and testing](#development-and-testing]. | ||||||
| If your manifest.json does not contain an ID, the extension is assigned a randomly-generated temporary ID when you [install it in Firefox](/documentation/develop/temporary-installation-in-firefox/) through `about:debugging`. If you then reload the extension using the "Reload" button, the same ID is used. If you restart Firefox and load the add-on again, it gets a new ID. This affects the APIs listed in [Development and testing](#development-and-testing). | ||||||
|
|
||||||
| If you turn the extension into an `.xpi` or `.zip` and install it through `about:addons`, it does not work. For it to work, you must add the [`browser_specific_settings`](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings) key in `manifest.json`. | ||||||
|
|
||||||
| ### Publishing | ||||||
|
|
||||||
| When you have finished developing the extension, you can [package it and submit it to AMO for review and signing](/documentation/publish/signing-and-distribution-overview/). If the packaged extension you upload does not contain an ID, AMO generates one. It's only at this point that the add-on is assigned a permanent ID, which is embedded in the signed packaged extension. | ||||||
|
|
||||||
| This ID is shown as `Extension ID` at `about:debugging` after the add-on is installed. This ID is the same for all users of the add-on. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ### Updating | ||||||
|
|
||||||
| After publication, you don't generally have to deal with the ID. You can continue to develop the add-on without an ID, and when you want to update, upload the new version by visiting the add-on's AMO page. Because you are uploading the add-on through that page, AMO knows that this is an update to the add-on, even though it doesn't contain an ID. | ||||||
|
|
||||||
| However, if you use [AMO's API](https://addons-server.readthedocs.io/en/latest/topics/api/v4_frozen/signing.html) to upload an update to a Manifest V2 extension that doesn't define the ID in its manifest.json file you must include the add-on's ID in the request. | ||||||
|
|
||||||
| And if you update your extension to use Manifest Version 3, [the add-on ID must be set](#how-do-i-set-an-add-on-id). | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
|
|
||||||
| {% endcapture %} | ||||||
| {% include modules/one-column.liquid, | ||||||
| id: "basic-workflow-with-no-add-on-id" | ||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.