Reputation: 854
I published my extension on following link https://chrome.google.com/webstore/detail/poenibgdeeoelggbbbhdddojjjglhdjm/publish-accepted?authuser=0&hl=en
.
When the extension runs the nativemessaging host and native messaging host sends a message it shows following error This extension may have been corrupted.
, and stops working.
The extension works fine in developer mode.
Upvotes: 2
Views: 1587
Reputation: 77541
This extension may have been corrupted.
This is a message that Chrome shows if any of the files inside the extension folder change. When an extension is published, Web Store adds a Google-signed list of file hashes to the extension (in the _metadata
folder), and any detected change is interpreted as a hijack attempt and leads to the extension being disabled.
You don't run into this in development mode, because Chrome does not consider file changes as abnormal (it is, after all, in active development).
If this is what your native component does (e.g. adds files to the extension or changes them), you can't use this technique. In particular, this does not allow you to change the extension's code externally.
Use other methods of storage of variable information in an extension, e.g. the storage
API or IndexedDB, and other methods of communication, e.g. the native host communication protocol or a local webserver in the native component (but think about security if you're doing that).
Upvotes: 5