我的Chrome扩展程序一直在说已损坏 [英] My Chrome Extension Keeps Saying Its Corrupted
问题描述
您在Google上遇到了一个边缘案例错误,它在运行时验证了磁盘上的扩展内容与上传到网上商店的内容匹配(旨在防止恶意软件欺骗合法扩展)。
三个已知的错误是:
crbug.com/437675 (内容脚本中的点斜线路径)
crbug.com/439464 (内容脚本注入的img标记中的错误情况)
crbug.com/444085 (有//代替/作为url内部的分隔符)
请仔细查看所有细节并正确更正您的代码。例如,对于我在这个问题上的经验,我遇到了crbug.com/444085,最终生成了至少两个带有双斜线的网址的请求:
images // arrow.png
images // popup.png
然后我修改了 script.js文件,其中包含以下脚本:
.... imgURL +'/arrow.png'....
.... imgURL +'/popup.png'....
由于 imgURL
在每种情况下都已经有一个结尾斜杠。然后问题就解决了。希望它有帮助。
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
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.
这篇关于我的Chrome扩展程序一直在说已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!