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

从很旧的版本升级后配置损坏 #283

Closed
lingsamuel opened this issue Apr 28, 2024 · 4 comments
Closed

从很旧的版本升级后配置损坏 #283

lingsamuel opened this issue Apr 28, 2024 · 4 comments
Labels

Comments

@lingsamuel
Copy link

是否可以稳定复现

复现步骤

打开任何一个视频,过一会就报错。匿名页单独启用扩展也是如此。

预期行为

正常工作。

实际行为

报错:

后处理分片 1 时出错
Cannot read properties of undefined (reading 'extra')

Stacktrace:
TypeError: Cannot read properties of undefined (reading 'extra')
    at post_combine (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:123025)
    at Scheduler.try_start_postproc (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:125249)
    at Scheduler.try_start_combine (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:122106)

Ingress:
{"type":"proto_seg","is_magicreload":false,"cid":"1298599762","pid":"364732198","static_img_url":"https://i0.hdslb.com/bfs/wbi/7cd084941338484aae1ad9425b84077c.png","static_sub_url":"https://i0.hdslb.com/bfs/wbi/4932caff0ff746eab6f01bf08b70ac45.png"}

pakku v2024.5.1 by @xmcp

禁用 pakku 后 bug 是否存在

是否与其他插件有关

B 站播放器版本号

4.8.20-60bc6d69

pakku 调试信息

隐去了tab信息,因为与特定视频无关

如果 pakku 完全无法工作,请完整地复制蓝框里的所有文字,并在反馈 bug 时附上。

[Debug Info]

Version: 2024.5.1

Channel: chrome

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0

Incognito: false

Has Session Storage: true

localStorage: {"MARK_THRESHOLD":"1","TOOLTIP_KEYBINDING":"on","_ADVANCED_USER":"off","DANMU_MARK":"prefix","TAOLUS":"","BLACKLIST":"[]","_LAST_UPDATE_TIME":"0","SHRINK":"off","TRIM_SPACE":"on","MAX_DIST":"5","TRIM_ENDING":"on","AUTO_DANMU_LIST":"off","THRESHOLD":"20","TRIM_WIDTH":"on","POPUP_BADGE":"percent","FLUCTLIGHT":"off","FORCELIST":"[[\"^23{2,}$\",\"233...\"],[\"^6{3,}$\",\"666...\"],[\"^[fF]+$\",\"FFF...\"],[\"^[hH]+$\",\"hhh...\"]]","CLOUD_SYNC":"off","WHITELIST":"[]","PROC_TYPE7":"on","PROC_POOL1":"off","CROSS_MODE":"on","HIDE_THRESHOLD":"0","BREAK_UPDATE":"off","DANMU_SUBSCRIPT":"on","PROC_TYPE4":"on","TRIM_PINYIN":"on","ENLARGE":"on","MAX_COSINE":"60","MODE_ELEVATION":"on","TOOLTIP":"on","AUTO_DISABLE_DANMU":"off","REPRESENTATIVE_PERCENT":"0","SCROLL_THRESHOLD":"1200"}

Views:

  • chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/page/options.html

  • chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/page/troubleshooting.html

Permissions: {"origins":["*://*.bilibili.com/*","https://www.bilibili.com/robots.txt?pakku_sandbox"],"permissions":["contextMenus","notifications","storage","scripting","declarativeNetRequestWithHostAccess"]}

Content Scripts: [{"allFrames":true,"css":["generated/injected.css"],"excludeMatches":["https://www.bilibili.com/robots.txt?pakku_sandbox"],"id":"pakku-ajax","js":["generated/xhr_hook.js"],"matchOriginAsFallback":false,"matches":["*://*.bilibili.com/*"],"persistAcrossSessions":true,"runAt":"document_start","world":"MAIN"}]

DNR Rules: []

State: {"GLOBAL_SWITCH":true,"STATS_1176320871":{"badge":"JS!","message":"后处理分片 1 时出错\nCannot read properties of undefined (reading 'extra')\n\nStacktrace:\nTypeError: Cannot read properties of undefined (reading 'extra')\n at post_combine (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:123025)\n at Scheduler.try_start_postproc (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:125249)\n at Scheduler.try_start_combine (chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/content_script.js:1:122106)\n\nIngress:\n{\"type\":\"proto_seg\",\"is_magicreload\":false,\"cid\":\"1298599762\",\"pid\":\"364732198\",\"static_img_url\":\"https://i0.hdslb.com/bfs/wbi/7cd084941338484aae1ad9425b84077c.png\",\"static_sub_url\":\"https://i0.hdslb.com/bfs/wbi/4932caff0ff746eab6f01bf08b70ac45.png\"}","type":"error"},"_INITIALIZED":true}

Tabs:

Config: {"ADVANCED_USER":false,"AUTO_DANMU_LIST":false,"AUTO_DISABLE_DANMU":false,"AUTO_PREVENT_SHADE":"off","BLACKLIST":"[]","BREAK_UPDATE":false,"CLOUD_SYNC":"off","COMBINE_THREADS":3,"CROSS_MODE":true,"DANMU_MARK":"prefix","DANMU_SUBSCRIPT":true,"DROP_THRESHOLD":0,"ENLARGE":true,"FLASH_NOTIF":"on","FLUCTLIGHT":false,"FOOLBAR":"off","FORCELIST":[["^23{2,}$","233..."],["^6{3,}$","666..."],["^[fF]+$","FFF..."],["^[hH]+$","hhh..."],["^[yYoO0][yYoO0\\s~]+$","yoo..."]],"HIDE_THRESHOLD":"0","MARK_THRESHOLD":1,"MAX_COSINE":60,"MAX_DIST":5,"MODE_ELEVATION":false,"POPUP_BADGE":"percent","PROC_POOL1":false,"PROC_TYPE4":true,"PROC_TYPE7":true,"READ_PLAYER_BLACKLIST":true,"REMOVE_SEEK":"off","SCROLL_THRESHOLD":900,"SHRINK":false,"SHRINK_THRESHOLD":0,"TAOLUS":"","THRESHOLD":20,"TOOLTIP":true,"TOOLTIP_KEYBINDING":false,"TRIM_ENDING":true,"TRIM_PINYIN":false,"TRIM_SPACE":true,"TRIM_WIDTH":true,"USERSCRIPT":null,"WHITELIST":[],"_ADVANCED_USER":"off","_CONFIG_VER":2,"_LAST_UPDATE_TIME":1714036633509}

Worker is Simulated: false

Exception: error log is working ("Error: error log is working\n at chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/troubleshooting.js:1:5966")

Exception in Promise: async error log is working ("Error: async error log is working\n at chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/troubleshooting.js:1:5923\n at chrome-extension://lnfcfeidnipnphibahlkdhalpkpmccoc/generated/troubleshooting.js:1:5963")

补充说明

No response

@xmcp
Copy link
Owner

xmcp commented Apr 28, 2024

你的pakku设置里缺少了 REPRESENTATIVE_PERCENT 键导致出现此问题,进入设置页面随便更改一个选项(触发保存操作)应该即可解决。

但是还不清楚为什么会这样,问下你是否存在以下情况:

  • 使用了导入/导出设置功能,导入了旧版pakku的设置
  • 很长时间没有打开浏览器,导致pakku是从一个很旧的版本自动更新过来的
  • 打开了浏览器的设置同步功能,且在其他设备的旧版pakku上更改了设置,导致将云端设置覆盖为旧版

@lingsamuel
Copy link
Author

lingsamuel commented Apr 28, 2024

确实好了。

  • 没有,我是在正常的使用中突然出现这个问题的。
  • 我目前使用的浏览器确实是一年没用之后再次使用的。不过已经使用了一个月都没有问题,这两天才出现的问题。
  • 我的确有多个chrome/edge使用了pakku,但是它们已经很久没有打开。

所以有可能是之前一直没自动更新,最近自动更新了导致的?

@xmcp xmcp added the bug label Apr 28, 2024
@xmcp xmcp changed the title Cannot read properties of undefined (reading 'extra') 从很旧的版本升级后配置损坏 Apr 28, 2024
@xmcp
Copy link
Owner

xmcp commented Apr 28, 2024

这几天在 edge 商店上线了 ManifestV3 重构版本,插件升级的时候会自动把设置从 localStorage 迁移到 chrome.storage.sync 里,但是不知道为什么 REPRESENTATIVE_PERCENT 这个设置迁移过去就没了。可能是从很旧的版本直接升级造成的,也可能是微软出了问题把它同步没了。

总之我在下个版本增加一些设置合法性的检查,应该能避免这种情况。

@xmcp xmcp closed this as completed Apr 28, 2024
@lingsamuel
Copy link
Author

lingsamuel commented Apr 28, 2024

似乎是整个配置都被重置了,因为我发现有个设置与我之前的配置不一样

点击展开弹幕信息: 按住 Ctrl / Command 键点击屏幕上的弹幕显示详细信息

这个配置我之前是勾选的,但是我刚刚去触发保存的时候发现它没有勾选。其他的选项没什么印象了,不知道是不是也有变化。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants