[Bug Report] Not working on vscode version 1.94
fz6m opened this issue · 13 comments
Summary | 概述
更新了最新的 vscode 版本,发现这个背景丢了。
遂尝试:
1、cmd + shift + p 能找到 background 插件相关的命令,但是运行之后会发生 not found 报错。
2、无论如何重新安装插件,貌似第一次安装时的逻辑不会运行,所以无论如何背景都注入不到 vscode 的 css 里。
于是回退 v1.93 ,可以正常使用,因为我一直用的是默认样式,所以先把样式 copy 出来用其他插件注入在 v1.94 使用了。
默认 CSS 样式:vscode-background-fork.css
Versions
OS(Win10 / Mac OSX / Linux)
: macosvscode
: v1.94
Background Config | 插件的配置
None
你用的 rainbow 这个插件不是和 background 这个插件冲突了,看了下 rainbow 这个插件的源码里面没有涉及 css 的操作,单纯是因为这个插件太老了,里面没限定插件作用的范围,也没做防御性编程,读到一些没有 document 和 filename 的窗口就为空炸了,属于 rainbow 那个插件的 bug 。
Reproduced with background 1.2.13 and VSCode 1.94.0 on Windows.
2024-10-04 08:57:15.358 [info] ExtensionService#_doActivateExtension shalldie.background, startup: false, activationEvent: 'onStartupFinished'
2024-10-04 08:57:15.403 [error] Activating extension shalldie.background failed due to an error:
2024-10-04 08:57:15.403 [error] TypeError: Cannot read properties of undefined (reading 'filename')
at Object.<anonymous> ([Extensions Path]\shalldie.background-1.2.13\out\utils\vscodePath.js:10:50)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> ([Extensions Path]\shalldie.background-1.2.13\out\background\Background.js:26:22)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> ([Extensions Path]\shalldie.background-1.2.13\out\background\index.js:17:14)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> ([Extensions Path]\shalldie.background-1.2.13\out\extension.js:19:22)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at hB.xb (file:///[VS Code Path]/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:23767)
at async Promise.all (index 0)
这边win10的background插件也似了,1.93.1版本可以使用,但1.94.0版本不行
2024-10-04 11:01:26.355 [error] TypeError: Cannot read properties of undefined (reading 'filename')
at Object.<anonymous> (/home/zhenya/.vscode/extensions/shalldie.background-1.2.13/out/utils/vscodePath.js:10:50)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/zhenya/.vscode/extensions/shalldie.background-1.2.13/out/background/Background.js:26:22)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/zhenya/.vscode/extensions/shalldie.background-1.2.13/out/background/index.js:17:14)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/zhenya/.vscode/extensions/shalldie.background-1.2.13/out/extension.js:19:22)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:13801)
at e._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:174:10870)
at t._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:22422)
at i._load (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4651)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at hB.xb (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:166:23767)
at async Promise.all (index 0)```
VSCode 1.94.0
I had the same problems on Mac/Windows
I also have the same problem after updating vscode to version 1.94, the background doesn't display anymore.
arch & vscode 1.94, 似乎同样出问题的还有vscode-fix-checksums
以及vscode-live2d
, 1.93这几个插件都正常, 但是同样修改vscode的vscode-custom-css
更新前后都没问题
There is an open pr with fix, but I don't really understand why they don't merge it. It was opened 2 days ago and has no changes since then.
Currently it is a public holiday in China, let's wait a few days.
Back now, I'll publish a new version to fix it as soon as possible。
v1.2.15 has been released.