0

My problem is the same as this question: How to change chrome packaged app id Or Why do we need key field in the manifest.json?

Our extension isn't going to be published to the web store, I tried creating the crx file using Pack Extension in development mode, and then I uploaded the crx file to https://robwu.nl/crxviewer/ but it said:

Unexpected crx format version number

I tried unzipping the crx file to see the key field in manifest.json but it's not set at all.

I can't find my extension in my user data directory, my extension uses native messaging and I need the ID to be constant on all client devices for allowed_origins to work in the native host manifest.

So how to get the key value for our manifest?

Mr Singh
  • 3,936
  • 5
  • 41
  • 60
niceman
  • 2,653
  • 29
  • 57
  • 1
    Paste the .pem file contents (the data between ---) into manifest.json as `"key"` value (without linebreaks, ofc). I haven't tried it though. They look similar but not the same (the overall length is different) so I guess only the first 216 characters are needed. Otherwise upload to the webstore, download from there, copypaste the `key` into your manifest.json from the downloaded manifest.json – wOxxOm Feb 25 '18 at 13:17

1 Answers1

0

You are getting that error because https://robwu.nl/crxviewer/ might be outdated. Install CRX viewer from the web store instead. After installing, use it on any extension. You will see something like this:

enter image description here

Click Open on the upper-right corner. You will see a page that looks similar to https://robwu.nl/crxviewer/. Now, click Choose File button and select your crx file. Open chrome's console (press F12 and click Console if it isn't selected by default) and you will see the key value for your manifest. Copy that and paste it into your extension's source manifest file.

Xel
  • 540
  • 2
  • 8
  • 27