Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) Error: MetaData信息错误 #161

Closed
zip11 opened this issue Mar 30, 2023 · 8 comments
Closed

Uncaught (in promise) Error: MetaData信息错误 #161

zip11 opened this issue Mar 30, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@zip11
Copy link

zip11 commented Mar 30, 2023

插件运行使用一段时间,在chrome扩展插件里面有错误按钮,
不知道是 脚本的错误,还是插件的错误

提示错误信息
Uncaught (in promise) Error: MetaData信息错误

上下文
src/background.html
堆叠追踪
src/background.js:1 (匿名函数)

`

@CodFrm
Copy link
Member

CodFrm commented Mar 30, 2023

插件的问题

应该是脚本的Userheader部分格式不正确,另外看看扩展的日志中有没有记录这个错误

@zip11
Copy link
Author

zip11 commented Mar 30, 2023

把脚本Userheader部分额外的注释 // 删除,用了会,不报错了

@zip11 zip11 closed this as completed Mar 30, 2023
@CodFrm
Copy link
Member

CodFrm commented Mar 30, 2023

可以看一下报错的脚本内容么?

@CodFrm CodFrm added the bug Something isn't working label Apr 6, 2023
@CodFrm
Copy link
Member

CodFrm commented Apr 6, 2023

缺少某些header的情况下会导致这个问题,后续再优化看一下

  • name/namespaces
  • version

@CodFrm CodFrm reopened this Apr 6, 2023
@zip11
Copy link
Author

zip11 commented Apr 11, 2023

可以看一下报错的脚本内容么?

太长发不出去,就是文件头申请权限最后一行,只写注释,不写申请权限的文本,就会报错,删除注释就好了

@CodFrm
Copy link
Member

CodFrm commented Apr 12, 2023

可以简化一下,可以复现就行,或者截图,这样说我还是不太明白

@zip11
Copy link
Author

zip11 commented Apr 12, 2023

可以简化一下,可以复现就行,或者截图,这样说我还是不太明白

// @grant none
// 注释会出错
// ==/UserScript==

注释这行存在就会报错,删除就没有问题

@CodFrm
Copy link
Member

CodFrm commented May 1, 2023

添加了数据校验,不合法的header会提示具体原因

@CodFrm CodFrm closed this as completed May 1, 2023
CodFrm added a commit that referenced this issue May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants