我的Chrome扩展程序一直在说已损坏 [英] My Chrome Extension Keeps Saying Its Corrupted

查看:123
本文介绍了我的Chrome扩展程序一直在说已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我有一个Chrome开发者帐户,我付了5块钱和东西。我在广泛测试后发布了我的扩展,并且它完美地工作,但是在我上传应用程序然后下载它进行测试后,每当我尝试打开它时,它都会从我的Chrome栏中消失,然后当我检查扩展时它说可能被损坏,我在chrome商店没有它的测试,它工作正常,iv试图重新上传它和一切,nothings工作。我花了5美元才能做到这一点,我想能够上传我的第一个扩展,请帮助。继承人链接到扩展程序: https:// chrome。 google.com/webstore/detail/its-raining-tacos-music-p/cnnefnjodgecgoncbgaeepfmmcjpchek

解决方案

您在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆