KeyPJ / seelieEx

https://cdn.jsdelivr.net/gh/KeyPJ/seelieEx@main/dist/index.user.js
21 stars 4 forks source link

仙灵网页界面没有出现按钮,Console输出错误信息: Uncaught (in promise) TypeError: Cannot read properties of undefined #1

Closed Patrick-Ze closed 2 years ago

Patrick-Ze commented 2 years ago
  1. 在史莱姆乐园网页登录
  2. 打开仙灵规划助手网页,没有出现按钮。查看Console时有如下错误信息
    userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED')
    at Object.356 (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:3092)
    at o (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:3822)
    at Object.373 (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:3604)
    at o (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:3822)
    at chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:7199
    at chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:108970
    at chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:108976
    at chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:298
    at Proxy.tms_3e2b11d0_b4a6_4528_81ad_8a2f87523dfc$ (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:17681:320)
    at it (<anonymous>:14:1074)
KeyPJ commented 2 years ago

麻烦试下新版本,https://raw.fastgit.org/KeyPJ/seelieEx/main/dist/index.user.js

Patrick-Ze commented 2 years ago

感谢跟进,我在全新的Chrome Profile里安装了新版本,完成了导入。 这个问题应该算解决了,但是如果要调查的话,下面是我进行过的操作,虽然不一定有帮助但我还是列一下:

原来的Chrome环境

在我原来的Chrome环境里还是会出问题(禁用除了Tampermonkey之外的所有扩展,仙灵网页上只有你的脚本是工作脚本),新版本的Console错误信息如下:

userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:1364 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Component')
    at Object.404 (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:1364:65)
    at __webpack_require__ (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:2151:41)
    at Object.16 (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:1991:16)
    at __webpack_require__ (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:2151:41)
    at userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:2203:37
    at userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:2206:12
    at webpackUniversalModuleDefinition (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:288:28)
    at Proxy.tms_3e2b11d0_b4a6_4528_81ad_8a2f87523dfc$ (userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:289:3)
    at it (<anonymous>:14:1074)
    at userscript.html?name=genshinSeelieEx.user.js&id=3e2b11d0-b4a6-4528-81ad-8a2f87523dfc:1:125

新创建的Chrome环境

后来我尝试了一下创建一个全新的Chrome Profile,只安装Tampermonkey和你的脚本,这次基本没有问题,准备地说是这样:

  1. 创建新的Chrome Profile(未登录任何Google账号)
  2. 安装Tampermonkey
  3. 安装你的脚本
  4. 登录铭记之旅的网页
  5. 打开仙灵网页 此时能够正常看到seelieEx的按钮,Console也没有报错
  6. 使用seelie的同步功能登录Google Drive,并使用云端数据覆盖本地
  7. 刷新了一下网页之后,seelieEx按钮消失,Console有错误信息(当时没有记录下来) 到这里,我以为找到了问题所在,但是当我清除浏览数据再次尝试6-7时,试了三次问题没有复现,seelieEx的按钮正常

理论上,我新创建的Chrome Profile和原来的环境是一样的,都只有Tampermonkey和一个工作状态的脚本,但是实际结果就是不一样…… 环境问题可能非常难复现,而且目前可能是我的个例。要说有什么特别的话,一个就是我上面提到的我会使用Google Drive同步数据,另外一个就是我在仙灵上管理了两个帐户的数据,可能不是一个常规的case。 总之目前已经成功导入了数据,感谢大佬辛勤的开发和分享~