My Chrome Extension Keeps Saying Its Corrupted

こ雲淡風輕ζ 提交于 2019-12-20 02:39:07

问题


I recently got a Chrome Developer account, i paid the 5 bucks and stuff. I published my extension after extensive testing and it works perfectly, but after i uploaded the app and then downloaded it to test it, whenever i try to open it, it disappears from my chrome bar and then when i check my extensions it says it may be corrupted, i tested this without it on the chrome store and it works fine, iv tried re-uploading it and everything, nothings working. I paid 5 dollars to be able to do this and i want to be able to upload my first extension, please help. heres the link to the extension: https://chrome.google.com/webstore/detail/its-raining-tacos-music-p/cnnefnjodgecgoncbgaeepfmmcjpchek


回答1:


It because you're hitting an edge case bug in Google which verifies at run time that the contents inside an extension on disk match what was uploaded to the web store (designed to prevent malicious software from spoofing legitimate extensions).

Three known such bugs are:

crbug.com/437675 (dot-slash paths in content scripts)

crbug.com/439464 (incorrect case in img tag injected by content-script)

crbug.com/444085 (having // instead of / as an interior separator inside a url)

Please look through all the details and correct your code properly. For example, for my experience with this issue I was running into crbug.com/444085 by ends up generating requests to at least two urls with double-slashes in them:

images//arrow.png

images//popup.png

Then I modified the lines in the "script.js" file where has script like:

....  imgURL + '/arrow.png'   ....

....  imgURL + '/popup.png'   ....

Since imgURL already has a trailing slash in each case. Then the issue was fixed. Hope it helps.



来源:https://stackoverflow.com/questions/30699914/my-chrome-extension-keeps-saying-its-corrupted

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