unpacked Extension ID same on different devices

679 views
Skip to first unread message

joette cordsen

unread,
Apr 29, 2022, 7:25:16 AM4/29/22
to Chromium Extensions
I'm not complaining because this makes it easier for development when using sync storage, but this is a new behavior - either because of manifest 3 or chrome. In the past when loading an unpacked extension on different devices (with the same name/source), sync storage wasn't sync'ed because the extensions had different id's. Now with the same extension ID across platforms, sync storage is working during development and testing. Nice change! (but was unexpected). 

Simeon Vincent

unread,
Apr 29, 2022, 3:29:46 PM4/29/22
to joette cordsen, Chromium Extensions
Are you including the key property in the manifest of your unpacked extension? If so, this is behaving as intended. If not, that's extremely weird.

Simeon - @dotproto
Chrome Extensions DevRel

On Fri, Apr 29, 2022, 4:25 AM joette cordsen <jill...@gmail.com> wrote:
I'm not complaining because this makes it easier for development when using sync storage, but this is a new behavior - either because of manifest 3 or chrome. In the past when loading an unpacked extension on different devices (with the same name/source), sync storage wasn't sync'ed because the extensions had different id's. Now with the same extension ID across platforms, sync storage is working during development and testing. Nice change! (but was unexpected). 

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/f651ae00-6886-49f0-bed5-655a125ae91en%40chromium.org.

Cuyler Stuwe

unread,
Apr 29, 2022, 11:38:52 PM4/29/22
to Simeon Vincent, Chromium Extensions, joette cordsen
Weird. Do they have the same path on both devices? IIRC when Chrome is forced to generate an extension ID for a sideloaded extension that needs one, it uses the path name to decide upon a hash.

joette cordsen

unread,
Apr 29, 2022, 11:39:47 PM4/29/22
to Chromium Extensions, Simeon Vincent, Chromium Extensions, joette cordsen
Nope - no key property. and - imho, this is a good change! It really does make development easier. In the past I had to code sync storage stuff and hope if worked, basically (lol) 

joette cordsen

unread,
Apr 29, 2022, 11:42:33 PM4/29/22
to Chromium Extensions, joette cordsen, Simeon Vincent, Chromium Extensions
yes, same path on both devices, but it didn't used to work this way. (for instance, my path is ~\desktop\localsource\blahblah)

hrg...@gmail.com

unread,
Apr 30, 2022, 1:26:13 AM4/30/22
to Chromium Extensions, jill...@gmail.com, Simeon Vincent, Chromium Extensions
yes, same path on both devices, but it didn't used to work this way. (for instance, my path is ~\desktop\localsource\blahblah)

Yes, it has always worked this way. This behavior is as old as I've been an extension developer (many, many years).
Two different computers using different OS versions and different Chrome versions will assign the exact same extension ID to an unpacked extension loaded from "C:\path\to\extension".

As long as the path is the same, the extension ID will be the same. It works even across different Chromium-based browsers.
 

Hr Gwea

unread,
Apr 30, 2022, 9:17:10 PM4/30/22
to Chromium Extensions
You don't need to rely on this behavior, though. The "key" property in the manifest is the proper way of controlling the extension ID. This way you don't need to worry about the directory path.


On Sat, Apr 30, 2022 at 5:42 AM Anthony Laxson <anthony...@gmail.com> wrote:
Fuck you

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

Simeon Vincent

unread,
May 3, 2022, 11:36:45 PM5/3/22
to Chromium Extensions, hrg...@gmail.com
Spot on, Hr! I believe this is where that's implemented: https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/extension.cc?q=GenerateIdForPath&ss=chromium%2Fchromium.

On Saturday, April 30, 2022 at 6:17:10 PM UTC-7 hrg...@gmail.com wrote:
You don't need to rely on this behavior, though. The "key" property in the manifest is the proper way of controlling the extension ID. This way you don't need to worry about the directory path.


On Sat, Apr 30, 2022 at 5:42 AM Anthony Laxson <anthony...@gmail.com> wrote:
Fuck you

On Sat, Apr 30, 2022, 12:26 AM hrg...@gmail.com <hrg...@gmail.com> wrote:
yes, same path on both devices, but it didn't used to work this way. (for instance, my path is ~\desktop\localsource\blahblah)

Yes, it has always worked this way. This behavior is as old as I've been an extension developer (many, many years).
Two different computers using different OS versions and different Chrome versions will assign the exact same extension ID to an unpacked extension loaded from "C:\path\to\extension".

As long as the path is the same, the extension ID will be the same. It works even across different Chromium-based browsers.
 

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.

Cuyler Stuwe

unread,
May 3, 2022, 11:38:52 PM5/3/22
to Simeon Vincent, Chromium Extensions, hrg...@gmail.com
The comment never mentioned that it could also be useful for maintaining an ID across machines. 😅

On Tue, May 3, 2022 at 8:36 PM Simeon Vincent <sim...@chromium.org> wrote:
On Saturday, April 30, 2022 at 6:17:10 PM UTC-7 hrg...@gmail.com wrote:
You don't need to rely on this behavior, though. The "key" property in the manifest is the proper way of controlling the extension ID. This way you don't need to worry about the directory path.


On Sat, Apr 30, 2022 at 5:42 AM Anthony Laxson <anthony...@gmail.com> wrote:
Fuck you

On Sat, Apr 30, 2022, 12:26 AM hrg...@gmail.com <hrg...@gmail.com> wrote:
yes, same path on both devices, but it didn't used to work this way. (for instance, my path is ~\desktop\localsource\blahblah)

Yes, it has always worked this way. This behavior is as old as I've been an extension developer (many, many years).
Two different computers using different OS versions and different Chrome versions will assign the exact same extension ID to an unpacked extension loaded from "C:\path\to\extension".

As long as the path is the same, the extension ID will be the same. It works even across different Chromium-based browsers.
 

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/b1aa39ba-022a-44b7-81d8-7c5b65c049e7n%40chromium.org.

Simeon Vincent

unread,
May 3, 2022, 11:51:07 PM5/3/22
to Chromium Extensions, salem...@gmail.com, Chromium Extensions, hrg...@gmail.com, Simeon Vincent
That's not exactly what we had in mind, but happy accidents I guess? For multi-device testing declaring a key in your manifest is definitely the way to go.

Simeon - @dotproto
Chrome Extensions DevRel

On Tuesday, May 3, 2022 at 8:38:52 PM UTC-7 salem...@gmail.com wrote:
The comment never mentioned that it could also be useful for maintaining an ID across machines. 😅

On Tue, May 3, 2022 at 8:36 PM Simeon Vincent <sim...@chromium.org> wrote:
On Saturday, April 30, 2022 at 6:17:10 PM UTC-7 hrg...@gmail.com wrote:
You don't need to rely on this behavior, though. The "key" property in the manifest is the proper way of controlling the extension ID. This way you don't need to worry about the directory path.


On Sat, Apr 30, 2022 at 5:42 AM Anthony Laxson <anthony...@gmail.com> wrote:
Fuck you

On Sat, Apr 30, 2022, 12:26 AM hrg...@gmail.com <hrg...@gmail.com> wrote:
yes, same path on both devices, but it didn't used to work this way. (for instance, my path is ~\desktop\localsource\blahblah)

Yes, it has always worked this way. This behavior is as old as I've been an extension developer (many, many years).
Two different computers using different OS versions and different Chrome versions will assign the exact same extension ID to an unpacked extension loaded from "C:\path\to\extension".

As long as the path is the same, the extension ID will be the same. It works even across different Chromium-based browsers.
 

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Reply all
Reply to author
Forward
0 new messages