microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.44k stars 29.35k forks source link

Source Control Broken and other things 1.75 #173315

Closed Jason3S closed 1 year ago

Jason3S commented 1 year ago

Type: Bug

After the latest update, VS Code has become unstable.

Saddly, there is no longer a clear way to install an older version of VS Code.

To be clear, I use VS Code everyday. I think it is great. Please keep up the good work and provide a way to roll back to a previous version in case something like this happens again.

VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z) OS version: Darwin x64 22.2.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|3, 4, 4| |Memory (System)|32.00GB (7.78GB free)| |Process Argv|cspell.code-workspace --crash-reporter-id 21ae0ece-62a2-4681-a5cf-c687ea23e753| |Screen Reader|no| |VM|0%|
Extensions (71) Extension|Author (truncated)|Version ---|---|--- terraform|4op|0.2.5 ada|Ada|23.0.12 commit-message-editor|ada|0.20.0 tsl-problem-matcher|amo|0.6.2 alignment|ann|0.3.0 vscode-zipfs|arc|3.0.0 astro-vscode|ast|0.28.2 better-toml|bun|0.3.2 scala|dal|0.0.5 vscode-jq-playground|dav|4.3.5 vscode-eslint|dba|2.2.6 gitlens|eam|13.2.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.29 prettier-vscode|esb|9.10.4 vscode-jest-runner|fir|0.4.60 linter-gfortran|for|3.2.0 gitpod-desktop|git|0.0.73 vscode-graphql|Gra|0.8.5 vscode-graphql-execution|Gra|0.1.7 vscode-graphql-syntax|Gra|1.0.6 mediawiki|jak|2.1.0 latex-workshop|Jam|9.6.1 svg|joc|1.5.0 jq-syntax-highlighting|jq-|0.0.2 language-haskell|jus|3.6.0 vscode-cfml|Kam|0.5.4 AWK|lug|0.0.2 Kotlin|mat|1.7.1 rainbow-csv|mec|3.5.0 dotenv|mik|1.0.1 vscode-apache|mrm|1.2.0 vscode-puglint|mrm|2.3.0 vscode-docker|ms-|1.23.3 playwright|ms-|1.0.6 isort|ms-|2022.8.0 python|ms-|2023.2.0 vscode-pylance|ms-|2023.2.10 jupyter|ms-|2023.1.2000312134 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.275.0 remote-ssh|ms-|0.96.0 remote-ssh-edit|ms-|0.84.0 azure-account|ms-|0.11.3 cpptools|ms-|1.13.9 live-server|ms-|0.4.5 remote-explorer|ms-|0.2.0 vscode-js-profile-flame|ms-|1.0.5 vetur|oct|0.36.1 marko|pca|0.4.0 java|red|1.14.0 vscode-yaml|red|1.11.0 es6-mocha-snippets|spo|0.2.2 avro|str|0.5.0 code-spell-checker|str|2.16.0 code-spell-checker-dutch|str|0.3.6 code-spell-checker-serbian|str|1.0.2 hunspell|str|1.0.2 svelte-vscode|sve|107.0.2 es6-string-html|Tob|2.12.0 vscode-mdx|uni|1.2.1 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 debug|web|0.26.1 php-debug|xde|1.31.0 markdown-all-in-one|yzh|3.5.0 vitest-explorer|Zix|0.2.37 php-intellisense|zob|1.0.13
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vscaac:30438847 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 2e4cg342:30602488 f6dab269:30613381 pythonsymbol12:30657548 2i9eh265:30646982 ```
Jason3S commented 1 year ago

For anyone trying to rollback to 1.74.3.

See: https://code.visualstudio.com/docs/supporting/FAQ#_previous-release-versions

Everything seems to be working after installing 1.74.3.

Jason3S commented 1 year ago

Please note: Insiders Build also has many of the same issues.

Version: 1.76.0-insider Commit: c4a609f94329b17d91cd13a4fd113d1abfe5ec1f Date: 2023-02-03T05:24:12.020Z Electron: 19.1.9 Chromium: 102.0.5005.194 Node.js: 16.14.2 V8: 10.2.154.23-electron.0 OS: Darwin x64 22.2.0 Sandboxed: Yes

Jason3S commented 1 year ago

To help narrow it down. Insider build on Monday Jan 23 at 09:45+00 worked just fine.

jmacura commented 1 year ago

Hi, I had the same issue as you state "Source Control cannot detect repositories."

It was only related to one workspace. Source control in other folders and workspaces worked just fine. So the difference was that in the problematic workspace I had a folder which no longer existed. When I removed that no-longer existing folder from the workspace, the Source control started to work again.

Perhaps it helps you and also the developers to fix the issue.

lszomoru commented 1 year ago

It was only related to one workspace. Source control in other folders and workspaces worked just fine. So the difference was that in the problematic workspace I had a folder which no longer existed. When I removed that no-longer existing folder from the workspace, the Source control started to work again.

Could you please elaborate on that? It would be great if you would be able to provide me with a set of repro steps. This is clearly a bug that I would like to investigate and address in the upcoming recovery release. Anyone experiencing issues related to repository discovery, can you please try setting the git.openRepositoryInParentFolders to always and see if you are still able to reproduce the issue? Thanks!

christianbraeunlich commented 1 year ago

We have also experienced this kind of behavior after upgrading to the new version. We also set the setting (at user level) to always. Unfortunately, this did not solve the problem. H/e the problem does not appear all the time. For me I had no problems the whole day and a colleague of mine struggled with it the entire day. Very weird behavior, but as @jmacura pointed out it might be related to only one specific workspace.

What I mean by "doesn't appear all the time" is that it somehow, after waiting a longer period of time, loses its repos and if i remember correctly it says something like "error: lost connection to extension host", not even sure if that's the error message related to that problem.. will try to repro it somehow ... and share the developer tools if it occurs.

lszomoru commented 1 year ago

@Jason3S, apologies for the inconvenience. I have been looking at the issue related to the repository discovery but I still do not have a produce that I can use to further debug this. Assuming that you still have VS Code Insiders installed on the machine in which you can reproduce the issue I was wondering if you could do the following:

  1. Close all windows of VS Code Insiders
  2. From a terminal window, run code-insiders --log trace
  3. Open the folder/workspace in which you are able to reproduce the issue
  4. Share the contents of the git output window

Couple of additional questions:

  1. Are you opening the problematic workspace using a workspace file, or just a folder?
  2. Are you able to reproduce the issue if you set git.openRepositoryInParentFolders to always?
jmacura commented 1 year ago

It was only related to one workspace. Source control in other folders and workspaces worked just fine. So the difference was that in the problematic workspace I had a folder which no longer existed. When I removed that no-longer existing folder from the workspace, the Source control started to work again.

Could you please elaborate on that? It would be great if you would be able to provide me with a set of repro steps. This is clearly a bug that I would like to investigate and address in the upcoming recovery release. Anyone experiencing issues related to repository discovery, can you please try setting the git.openRepositoryInParentFolders to always and see if you are still able to reproduce the issue? Thanks!

The git.openRepositoryInParentFolders to always seems to be a catch. My repro tests were OK with the always option, but re-appeared when changed back to prompt. Steps to reproduce:

  1. open VS Code
  2. add several folders to workspace, at least one of them must be a git repo
  3. save workspace into a file
  4. close VS Code
  5. delete one of the folders which are included in the workspace (not the git one)
  6. open VS Code (and if the workspace is not loaded automatically, open it)
  7. go to "Source control"

image

To circumvent the issue:

  1. remove the deleted folder from the workspace
  2. reload VS Code image
lszomoru commented 1 year ago

I believe I was able to track down the root cause. The fix should be included in Monday's VS Code Insiders release.

Jason3S commented 1 year ago

@lszomoru,

Thank you for looking into this.

In my case, one of the workspace folders had been deleted, but the reference was still there. Deleting the path from the workspace seems to have worked. I did not need to add git.openRepositoryInParentFolders

I'm going to close this as a duplicate of #173226.