Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome extension installation error message

I built a small Chrome extension - it shows your IP and geolocation information. I tested it several times, packaged it (using Grunt) and uploaded to the Chrome web store. I verified several time that the resulting zip file contains all the files needed by the app + the manifest.

I then removed my local version, and tried installing from the web store. I keep getting this error, even after refreshing, and restarting the browser several times:

"There was a problem adding this item to Chrome. Please refresh the page and try again."

enter image description here

How do I debug/solve this problem?

  • The code to my extension is very simple, and is actually open on GitHub.
  • The manifest file is available here.
  • The extension is available on the Chrome store here.

Update:

Looking at the JS console, I see an error every time I hit the install button:

webstorePrivate.beginInstallWithManifest3: Invalid manifest

No further information, and to me the manifest file looks ok (and it works when loaded locally).

like image 380
Traveling Tech Guy Avatar asked Apr 21 '13 00:04

Traveling Tech Guy


People also ask

Why can I not install Chrome extensions?

Make sure you have the latest version of Chrome. Learn how to update Chrome. If you're using a work or school computer, your administrator might not let you install items from the Chrome Web Store. For more help, contact your administrator.

How do I force Chrome extensions to install?

Go to the app or extension that you want to automatically install. Under Installation policy, choose Force install or Force install + pin. Click Save.


3 Answers

Ok, took a while, but I found the culprit and fixed it. I used Yeoman and Generator-Chrome-Extension to bootstrap the extension. One of the tasks in the Gruntfile.js reads like this:

grunt.registerTask('manifest', function() {
        var manifest = grunt.file.readJSON(yeomanConfig.app + '/manifest.json');
        //manifest.background.scripts = ['scripts/background.js'];
        grunt.file.write(yeomanConfig.dist + '/manifest.json', JSON.stringify(manifest, null, 2));
    });

As you can see on the third (commented) line, the task injects a background.js script EVEN if you do not need it. Furthermore if you, like me, use a background page, this renders the manifest invalid.

For some reason, it will work locally, just not from the store. Once I commented that line, the manifest is valid, and the extension available.

like image 108
Traveling Tech Guy Avatar answered Sep 20 '22 18:09

Traveling Tech Guy


I had the same problem. I removed:

"app": {
    "urls": [
    ],

From the Manifest.json file and it works. Hope this helps.

like image 38
kamilrextin Avatar answered Sep 21 '22 18:09

kamilrextin


I had the same problem and I logging in with a proxy and the problem fixed.

Try a proxy as i guess.

like image 30
Mehdi Khademloo Avatar answered Sep 23 '22 18:09

Mehdi Khademloo