Can I programmatically obtain the .crx of my published extension if I never had the key.pem?

283 views
Skip to first unread message

Z Yin

unread,
Mar 19, 2022, 9:01:07 AM3/19/22
to Chromium Extensions

I published an extension to CWS without creating key.pem first.

Then I find myself needing to provide .crx for some of my users who can't access CWS, and I want to make sure it has the same id as the CWS version.

Currently what I do is download the .crx from my CWS dashboard, but the problem is I can't automate it as part of building / releasing new patches.

Is there a way to build the .crx locally without having a .pem key? Or, is it possible to download the .crx from CWS in an automated way?

Deco

unread,
Mar 19, 2022, 9:36:28 AM3/19/22
to Z Yin, Chromium Extensions
In order to do this you will need to maintain 2 separate redistributions of your extension locally. It is not possible to fetch the key from the CWS every time, instead what you will need to do is package the CRX on the browser itself from an unbundled state using the PEM key you download from CWS, then distribute this packaged CRX to those who require it separately.

Thanks,
Decklin 

--
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/73d4db00-8148-4450-831d-a0ea02d739fen%40chromium.org.

Z Yin

unread,
Mar 19, 2022, 9:58:08 AM3/19/22
to Chromium Extensions, decklin...@gmail.com, Chromium Extensions, Z Yin
>  using the PEM key you download from CWS

How can I download the pem key from CWS? I believed it was impossible.

Deco

unread,
Mar 19, 2022, 10:09:04 AM3/19/22
to Z Yin, Chromium Extensions
Apologies there has been a miscommunication on my part, what I was meaning to infer is that in order to separate this function for the separate CRX branch you cannot use the CWS, it has to be maintained and updated locally.

How you will do this is by packaging the unbundled extension file structure that currently exists which will output the PEM key. You can then use this for sideloading updates onto the browser with this key - note however, this cannot be downloaded from the CWS, it must be maintained separately.

Thanks,
Decklin 

Z Yin

unread,
Mar 19, 2022, 10:39:25 AM3/19/22
to Chromium Extensions, decklin...@gmail.com, Chromium Extensions, Z Yin
Hi, as I mentioned, I need to provide direct .crx download for some users, but want to ensure their extension ID is the same as the CWS ID. I'm confused about will your suggestion create a different ID? For instance, if I use the "Pack extension" button, it'll definitely generate a different ID.

Deco

unread,
Mar 19, 2022, 11:06:09 AM3/19/22
to Z Yin, Chromium Extensions
What you are attempting to do is impossible, the suggestion I have given will indeed generate a new ID, it is the only realistic option for serving users who require a separate CRX however.

Z Yin

unread,
Mar 19, 2022, 11:57:13 AM3/19/22
to Chromium Extensions, decklin...@gmail.com, Chromium Extensions, Z Yin
Well, it's not impossible if I had known better and created the pem key before the initial publishing, and then submit the pem key to CWS for the initial publishing.

hrg...@gmail.com

unread,
Mar 19, 2022, 6:52:49 PM3/19/22
to Chromium Extensions, Z Yin, decklin...@gmail.com, Chromium Extensions
My understanding was that it's no longer possible to install .crx files locally. That functionality was removed from Chrome several years ago.
So, how are your users using the .crx file?

Cuyler Stuwe

unread,
Mar 19, 2022, 9:16:35 PM3/19/22
to hrg...@gmail.com, Chromium Extensions, Z Yin, decklin...@gmail.com
My guess is that maybe at least one Chromium-based browser still allows you to install via CRX. 

Cuyler Stuwe

unread,
Mar 19, 2022, 9:24:17 PM3/19/22
to Cuyler Stuwe, Chromium Extensions, Z Yin, decklin...@gmail.com, hrg...@gmail.com

Cuyler Stuwe

unread,
Mar 19, 2022, 9:32:06 PM3/19/22
to Cuyler Stuwe, Chromium Extensions, Z Yin, decklin...@gmail.com, hrg...@gmail.com
Chrome’s docs also still say you can sideload CRX on Linux (presumably because the “Linux market” is assumed to be intelligent/informed enough to be trusted to decide for themselves what software seems trustworthy?):

hrg...@gmail.com

unread,
Mar 19, 2022, 9:43:16 PM3/19/22
to Chromium Extensions, cuyler...@gmail.com, Chromium Extensions, Z Yin, decklin...@gmail.com, hrg...@gmail.com, salem...@gmail.com
Well, in that case you can download your .crx file programmatically from this URL:
The last part in red must be your extension ID.

Z Yin

unread,
Mar 20, 2022, 6:16:53 AM3/20/22
to Chromium Extensions, hrg...@gmail.com, cuyler...@gmail.com, Chromium Extensions, Z Yin, decklin...@gmail.com, salem...@gmail.com
>  Well, in that case you can download your .crx file programmatically from this URL:

Thanks!!! This is the correct answer!
Reply all
Reply to author
Forward
0 new messages