Google Chrome Extension Crashes When Installed From Webstore - Need To Identify Cause of Crash

对着背影说爱祢 提交于 2019-12-06 01:13:12

I've looked into your issue, and there are two issues here:

  1. Your extension gets disabled, "This extension may have been corrupted."
  2. Chrome crashes.

The latter is caused by a bug that has been fixed in Chrome 40, so I'll only focus on the first issue.

The first issue is caused by Content Verification, an (experimental) security feature in Chrome that ensures the integrity of extensions from the Chrome web store, by disabling extensions that have become corrupted crbug.com/369895. Corruption is detected by verifying the checksum of a file whenever an extension file is accessed by Chrome (for files referenced in the manifest file: at install-time; for other (embedded) files: when the file is loaded).

Unfortunately, there are some bugs in the implementation that causes extensions to be disabled in the following circumstances as well:

  • crbug.com/439464 - The spelling of a filename in does not match the spelling of the path. On Windows and some Mac systems, the filesystem is case-sensitive, so during development, you may not notice that the spelling of the filename is incorrect. Content verification is case-sensitive, so it will treat "icon.png" different from (uppercase) "Icon.png".
    (This discrepancy in checks is unfortunate, but a good thing: if you use an incorrect spelling in the icons field, then the extension would not load on case-sensitive filesystems such as those commonly used on Linux.)

  • crbug.com/444085 - The paths are not resolved into a canonical form. When you use two "//" instead of "/", then Chrome will find the file, but not its corresponding checksum and disable the extension. To fix this, change "path//to/file" to "path/to/file". Fixing static paths (e.g. in HTML and CSS files) is relatively easy, but if you construct the paths dynamically, then finding the culprit becomes much harder.

To find out why your extension gets disabled, follow the instructions at crbug.com/444085#c25.

The problem was related to a broken url in one of the css files. By disabling all scripts and css we were able to find the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!