Extension not installing: CRX_HEADER_INVALID

4,108 views
Skip to first unread message

Dan

unread,
Jan 27, 2021, 11:40:00 AM1/27/21
to Chromium Extensions
I updated some code in an unlisted extension I am managing, published it to the store as usual, and it has successfully updated the version number.

When I attempt to install it, I get:
Package is invalid: 'CRX_HEADER_INVALID'.

The crx file is created for me, as per the docs here: https://developer.chrome.com/docs/webstore/faq/#creating-a-listing

... I just upload the zip file containing my extension's code. I don't know what to do. I checked it is crx3 and it is. I am running Chrome Version 88.0.4324.96.

Sorry if this is the wrong place to post, please direct me if so. 

Thanks
Dan

Dan

unread,
Jan 27, 2021, 11:52:54 AM1/27/21
to Chromium Extensions, Dan
Worth noting, I uploaded the last working version back to the store, and still get this package is invalid error. So I think this issue must be down to how my zip gets changed to a crx file, or maybe something to do with chrome 88. It was working on other recent versions of chrome though, and looking at the docs the only other thing I can see is the option to use manifest v3, and this is still v2.

Artem Harutyunyan

unread,
Jan 27, 2021, 12:20:32 PM1/27/21
to Dan, Chromium Extensions
We had a similar issue and I used CRX Viewer extension to debug and see what's happening. When you upload the package to the Web Store (and before you publish it) you can right-click on `main.crx` in Publish section and can do 'View Linked Extension Source'. This way you can verify that the extension loads properly before you publish it.  In our case, the problem was with how we were adding files to the .zip archive, apparently, Chrome wasn't able to unzip the bundle properly because we were using './' in path names.

HTH

--
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/a7556621-17df-4790-b0e7-9edb476e874an%40chromium.org.

Dan

unread,
Jan 27, 2021, 12:39:45 PM1/27/21
to Chromium Extensions, Artem, Chromium Extensions, Dan
Thank you. Can you tell me how you came to conclude that it was the './' in the path names causing the issue?

I have used the CRX Viewer extension to download a zip copy of the extension, and it opens and works fine, and I see no errors button for this extension in the chrome://extensions/ page. Not sure if this is what you meant to do? 

Artem Harutyunyan

unread,
Jan 27, 2021, 1:45:32 PM1/27/21
to Dan, Chromium Extensions
Sorry, my description was a bit abrupt :). What I was suggesting to do is open the Chrome Web Store development console, go to the Package section where you should see the draft version of the package you uploaded to store as well as the published version. There you should see a link to `main.crx`. If you right-click on that then you should see 'View linked extension source' in the menu (that's added by the CRX Viewer extension). In my case (when I was opening the package in the CRX viewer) I was seeing a lot of missing files. That was how I knew something was wrong and started poking around the .zip file with zipinfo and zipdetails (available out of the box on macOS). That's where I noticed that the paths inside the .zip file had `./` in them. Once we fixed that Chrome Store was able to process the extension without problems. 

Dan

unread,
Jan 27, 2021, 2:14:14 PM1/27/21
to Chromium Extensions, Artem, Chromium Extensions, Dan
Ah I see. Thank you for the information. I have checked this as you advised, but no missing files for me! Where would you go from here if you were me? I am aware of http://crbug.com/ someone suggested elsewhere, but doesn't seem relevant in this instance. I may be mistaken, but there appears to be no other way to query such issues with google.

Dan

unread,
Jan 27, 2021, 2:16:01 PM1/27/21
to Chromium Extensions, Dan, Artem, Chromium Extensions
Probably also worth noting, that since my original post, I have managed to try it on multiple versions of chrome, and I also put the extension back to an earlier code version that we had previously on the store without issue. In all instances we get the same package is invalid error.
Message has been deleted

Artem Harutyunyan

unread,
Jan 27, 2021, 4:13:17 PM1/27/21
to Dan, Chromium Extensions
I’d probably give a close look to the tool chain used to generate the .zip bundle and see whether anything changed there. I’d double check versions and configuration of webpack (that’s what we use) and other components of the tool chain.

Sorry, I know this is not much help. Wish I could help more. Please do update the list when you eventually figure it out :).

Artem.

Dan

unread,
Jan 27, 2021, 4:43:39 PM1/27/21
to Chromium Extensions, Artem, Chromium Extensions, Dan
Thanks again for your replies Artem. I'm using a Mac, and I just right click the folder and compress to get the zip, and this always worked. Not using webpack or any other script bundler, and no node packages.

It is all helpful, I do appreciate it. I will update if / when I get to the bottom of it!

Thanks
Reply all
Reply to author
Forward
0 new messages