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

VS Code erroneously registers itself with as a .SVGZ handler #231021

Open
skycommand opened this issue Oct 10, 2024 · 4 comments · May be fixed by #239180
Open

VS Code erroneously registers itself with as a .SVGZ handler #231021

skycommand opened this issue Oct 10, 2024 · 4 comments · May be fixed by #239180
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Milestone

Comments

@skycommand
Copy link

skycommand commented Oct 10, 2024

Type: Bug

Upon installation on Microsoft Windows, Visual Studio Code registers itself as a handler for .svgz files. This is an egregious action because Visual Studio Code cannot handle this binary file type.

Edit (2024-10-12): I've found one part of VSCode's source code responsible for this erroneous file association: https://github.com/microsoft/vscode/blob/main/build/win32/code.iss#L1120-L1124

Steps to reproduce:

  1. Create a virtual machine with a clean version of a supported version of Windows 10

  2. Download and install VSCodeSetup-x64-1.94.1.exe. Use the defaults.

  3. Create a .svgz file on your desktop.

    The fastest way to that is to open PowerShell 5.1 and issue the following command:

    [Convert]::FromBase64String('H4sIAAAAAAAACxXMMQqEMBBG4av8zPbOGGOKJUlh5RnshN1VIa6iwfH4Krzy4/n9GHDO6b8HGnNe38yqWmhVLNvARkT4FoRj+mqznIEEgsrcUfRrn0f8ppQCvWxd984SPoHm0sGhNDDS2o44+ucRLyei7ABrAAAA') | Set-Content 'Test.svgz' -Encoding Byte
  4. Double-click the newly created .svgz file.

Expected result: Windows should inform the user that no app has been registered to handle this file type.

Actual result: Visual Studio Code launches, attempts to open the file, and fails.

VS Code version: Code 1.94.1 (e10f2369d0d9614a452462f2e01cdc4aa9486296, 2024-10-05T05:44:32.189Z)
OS version: Windows_NT x64 10.0.19045
Modes:

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@joshspicer
Copy link
Member

On my windows machine I am not seeing any default program set for the svgz extension
Image

When I follow your repro steps, I am seeing the application selection prompt that you expect to see

Image

Perhaps your machine has been inadvertently configured to open svgz in Code? I believe you can change that setting in your Windows preferences to your application of choice.

@skycommand
Copy link
Author

skycommand commented Oct 10, 2024

@joshspicer

Perhaps your machine has been inadvertently configured to open svgz in Code?

The reproduction steps that I supplied were given for a clean virtual machine with a fresh installation of Windows, not for my machine. You seem to have missed that fact. I test bugs on virtual machines so that I avoid the "baldy configured machine" trap.

On my windows machine

Perhaps your machine has been inadvertently configured that way.

@skycommand
Copy link
Author

@joshspicer Hello again. I hope I'm not being a bother, but I'd like to let you know that I've found the portion of Visual Studio Code's source code responsible for this issue. I thought letting you know would let you expedite the fix:

https://github.com/microsoft/vscode/blob/main/build/win32/code.iss#L1120-L1124

And in the case you have trouble finding it, here is a screenshot to help you.

Image

And here is the outcome of said code:

Image

If there is anything else you need to know, please let me know.

@joshspicer joshspicer assigned joaomoreno and unassigned joshspicer Dec 11, 2024
@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues labels Dec 19, 2024
@joaomoreno joaomoreno added this to the January 2025 milestone Jan 30, 2025
joaomoreno added a commit that referenced this issue Jan 30, 2025
@joaomoreno joaomoreno linked a pull request Jan 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants