shalldie / vscode-background

Bring background images to your vscode. vscode background 背景扩展插件。
https://marketplace.visualstudio.com/items?itemName=shalldie.background
MIT License
1.39k stars 140 forks source link

[Bug Report] Corruption occurs when upgrading vscode through package manager in some Linux distributions #487

Closed ZhenyaGoroh closed 1 week ago

ZhenyaGoroh commented 2 weeks ago

Summary | 概述

The extension ruins the whole vscode

Versions

image

comradez commented 2 weeks ago

It seems to disrupt all the text in the extension section.

Zylsjsp commented 2 weeks ago

Could reproduce in 1.95.1

shalldie commented 2 weeks ago

@ZhenyaGoroh Try this two ways to make a fix: how-to-uninstall , vscode-crashes

@comradez @Zylsjsp Have you also encountered it and is it also on Ubuntu?

EmmetZ commented 2 weeks ago

same problem on fedora 40

shalldie commented 2 weeks ago

OK, I found a machine and will investigate the cause

Zylsjsp commented 2 weeks ago

@shalldie I'm on Archlinux, using AUR package. The issue should be reproduced on any linux installation. I'll try reinstalling the plugin to see if the issue also reproduces on Mac.

Zylsjsp commented 2 weeks ago

On a new Mac universal installation v1.95.1 it's OK.

shalldie commented 2 weeks ago

Tested, works fine.

Known issues


The above are some of the issues I have summarized, which will be added to the Common Issue. There are too many Linux distributions for me to test one by one. I hope everyone can give some suggestions when they have time.


Edit: vscode of binary version is supported.

ZhangYaoan commented 2 weeks ago

I have the same issue on VSCodium 1.95.1, Fedora 41 (not binary version).

By the way, it's not just not working, but break all strings in VSCode (like this) 截图 2024-11-03 09-48-17

vbuchara commented 1 week ago

I'm using Ubuntu 24.04.1 LTS, and I installed my vscode via the .deb file from the vscode site using apt-get. Still experiencing the same problems.

I tried to uninstall the extension and install again, to no avail. It seems like the newest vscode update broke the extension. You should look into it.

Captura de tela de 2024-11-04 09-08-45 Captura de tela de 2024-11-04 09-09-08

shalldie commented 1 week ago
  1. Download the .deb package
  2. And run sudo apt install ./<file>.deb

@vbuchara Is this your way to install vscode? Which .deb do you choose, x64 、Arm32 or Arm64 ?

vbuchara commented 1 week ago
  1. Download the .deb package
  2. And run sudo apt install ./<file>.deb

@vbuchara Is this your way to install vscode? Which .deb do you choose, x64 、Arm32 or Arm64 ?

Amd64. I can say that's it's probably something that vscode changed on 1.95 that is causing the issue. I rolled back to 1.94, and everything is working fine.

Zylsjsp commented 1 week ago

@shalldie It's not a distribution-specified issue, fix on any distribution will benefit all other distributions.

The extension ruins the whole vscode

As @ZhenyaGoroh indicated, the extension seems corrupted css files. I have a post-install script for my VSCode to substitute VSCode logo in blank page with customized one. It is implemented in Python with built-in re module, and works well still in 1.95.x. You should be able to reproduce the issue through a brand-new installation of linux VSCode, getting this extension clearly uninstalled and removed, then install again.

EDIT: I'm not so familiar with Node.js, so maybe it would take long before I could figure out the reason and maybe have a fix.

shalldie commented 1 week ago

@Zylsjsp It will edit the js file since v2.

It's not always reproducible, at least in my case ... Some users are also using Ubuntu normally.

I have tried Ubuntu 24.04.1 LTS (amd6), Fedora 40 (arm64) in a vm, and It works fine. I am still trying =。=

shalldie commented 1 week ago

又尝试了 Ubuntu 24.04 LTS (aarch64) 无果。 感觉可能是我的某个姿势不太对,方便加个Q进一步沟通吗?在你有空的时候 @Zylsjsp qq**

vbuchara commented 1 week ago

@Zylsjsp It will edit the js file since v2.

It's not always reproducible, at least in my case ... Some users are also using Ubuntu normally.

I have tried Ubuntu 24.04.1 LTS (amd6), Fedora 40 (arm64) in a vm, and It works fine. I am still trying =。=

Perhaps it is language dependent? What language are you setting on the vscode? It doesn't help I've never seen an error like this before, so I understand the struggle.

shalldie commented 1 week ago

Perhaps it is language dependent? What language are you setting on the vscode? It doesn't help I've never seen an error like this before, so I understand the struggle.

@vbuchara I tried both default English(en) and zh-cn.

image

Two question:

  1. Have you ever seen some error or strange msg in OUTPUT of Extension Host?
  2. Once uninstall the extension, vscode restored to normal?

I don't know if it's related to my use of virtual machines

vbuchara commented 1 week ago

Perhaps it is language dependent? What language are you setting on the vscode? It doesn't help I've never seen an error like this before, so I understand the struggle.

@vbuchara I tried both default English(en) and zh-cn.

image

Two question:

  1. Have you ever seen some error or strange msg in OUTPUT of Extension Host?
  2. Once uninstall the extension, vscode restored to normal?

I don't know if it's related to my use of virtual machines

  1. I'm not sure, since it's hard to find the channel with all the text messed up, but I don't think so.
  2. If I reinstall vscode and never let the extension do its thing to put the background, the vscode stays normal. It's only when the extension puts the background that the text breaks.

I will see later if something odd appears on the ouput channel.

EmmetZ commented 1 week ago

I have upgraded my system to Fedora 41, and the bug was fixed, everything seems to work fine ... 🤔

vbuchara commented 1 week ago

@shalldie Only thing that caught my eye was this, after I let the extension use sudo to execute the JS to change the background.

Captura de tela de 2024-11-05 13-31-45

vbuchara commented 1 week ago

@shalldie Only thing that caught my eye was this, after I let the extension use sudo to execute the JS to change the background.

Captura de tela de 2024-11-05 13-31-45

After some digging, this doesn't seem related to the current issue, but you did leave here a piece of throw-able code untreated. It doesn't stop the background from working, but it makes so the "Background has changed!" notification doesn't go through, because the code stopped at the exception.

image

vbuchara commented 1 week ago

As far as I could see, the problem seems to be with the new workbench.desktop.main.js generated by the extension, but I'm not sure what exactly.

I managed to get its contents, copied the portion appended by the extension, pasted on the old workbench.desktop.main.js (Before the extension altered it with the sudoExec(cmdarg, { name: 'Background Extension' })), and everything seems to be fine.

image

shalldie commented 1 week ago

@vbuchara Thanks a lot ! Because I cannot reproduce it here, it is very difficult to find the reason for it.

What's the difference between these two files? Or can you send out the file?

abbytec commented 1 week ago

Same problem here, all the buttons on vscode seem to be text-corrupted until I reinstall vscode.

vbuchara commented 1 week ago

@vbuchara Thanks a lot ! Because I cannot reproduce it here, it is very difficult to find the reason for it.

  • New workbench.desktop.main.js generated by the extension, after sudoExec
  • I managed to get its contents, copied the portion appended by the extension, pasted on the old workbench.desktop.main.js

What's the difference between these two files? Or can you send out the file?

I don't know, I skimmed over both files, I didn't spot a huge difference. It doesn't help it's a big minified file, so it's hard to spot anything.

I can also say that this diference is weird, since your code just reads from the original file and adds to it. Maybe try to use fs or some other command to append to it? Instead of reading the contents and creating a new file.

Leroymilo commented 1 week ago

Same problem on Nobara 40 (modified version of Fedora). It only happens on version 1.95.0 and later of VSCode, version 1.94.2 is ok. I didn't see anyone sharing this warning message, I get it every time I start VSCode after activating the extension with sudo/admin: Screenshot_20241107_193346

KaiDaCanadian commented 1 week ago

I didn't see anyone sharing this warning message, I get it every time I start VSCode after activating the extension with sudo/admin: Screenshot_20241107_193346

This is just the "Your VSCode installation is corrupt" message but with screwed up localization

shalldie commented 1 week ago

Those friends who have problems, add a emoji to tell me if your scene is like this?

  1. vscode + background, works well.
  2. vscode upgrade,through the package manager, it is not the update of VSCode itself
  3. problems occur.
  4. If the vscode directory is not deleted in the future, reinstallation will still encounter problems

出现该问题的朋友,点个 emoji 来告诉我你是否是这种场景?

  1. vscode + background, 用的挺好的.
  2. 通过包管理器更新vscode,而不是自身的“更新”功能
  3. 出现问题
  4. 后续如果始终直接用包管理器重装(没有先remove),问题始终存在。

Temporary repair - 临时修复

shalldie commented 1 week ago

Fixed in v2.0.2