microsoft / vscode

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

Regularly stuck with "Scanning folder for git repositories…" when using Codespaces and VS Code #190024

Closed jonsage closed 1 year ago

jonsage commented 1 year ago

Does this issue occur when all extensions are disabled?: N/A (remote extensions are needed)

Steps to Reproduce:

  1. Open a repository with a devcontainer from GitHub Codespaces (either in browser VS Code, or desktop)
  2. Look at the Source Control tab - it says "Scanning folder for git repositories…"

I have seen this issues before months back, and it was fixed in Insiders and subsequently the release version - but it is back again and very frustrating.

I have a minimal repo here https://github.com/jonsage/vscode-git-scanning-bug - you will need to create a Codespace to see the issue (or choose a different devcontainer workflow).

The issue could be to do with the docker image used, I think last time there was some suggestion of a problem with Alpine (or Alpine containers), and I believe the Jekyll container is based on Alpine. too.

lszomoru commented 1 year ago

@deepak1556 it looks like https://github.com/microsoft/vscode/issues/178748 has resurfaced. I am able to reproduce with the latest Insiders release.

deepak1556 commented 1 year ago

Very likely candidate https://github.com/microsoft/vscode-linux-build-agent/commit/a2d892ca12be474e8d74c15dcad20e7c91cc01e5, will investigate tomorrow.

deepak1556 commented 1 year ago

Steps for verification:

jonsage commented 1 year ago

I've checked in the latest Insiders release and the same bug seems to still be present when using GitHub Codespaces (both in web version of VS Code insiders, and desktop version of VS Code insiders when connecting to the Codespace)

Version: 1.83.0-insider (Universal) Commit: f36df69328ed10f76d4be03e8a82b61794b49711 Date: 2023-09-13T05:34:48.836Z Electron: 25.8.0 ElectronBuildId: 23503258 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin x64 22.4.0

deepak1556 commented 1 year ago

the alpine servers run fine with the provided container configuration, however the git scm is hanging for a different reason @lszomoru can you please look into it

lszomoru commented 1 year ago

@deepak1556, I have created a new Codespace on the linked repository and I am still able to reproduce the problem. As far as I can tell the extension how is completely busted as running "Show Running Extensions" is empty. In the Window output log I see the following:

2023-09-27 21:42:17.569 [error] [Extension Host] Error: Error relocating /vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/node_modules/@vscode/spdlog/build/Release/spdlog.node: _ZSt28__throw_bad_array_new_lengthv: symbol not found
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at u._load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:154:5631)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at bindings (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/node_modules/@vscode/spdlog/index.js:3:35)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at u._load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:154:5631)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at i (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:98)
    at n.load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:4:1651)
    at _.load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:3:9105)
    at u (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:9362)
    at Object.errorback (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:9481)
    at _.triggerErrorback (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:3:9399)
    at /vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:3:9150
    at n.load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:4:1668)
    at _.load (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:3:9105)
    at u (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:9362)
    at h._loadModule (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:9490)
    at h._resolve (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:6:452)
    at h.defineModule (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:5585)
    at h._relativeRequire (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:6209)
    at e (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/loader.js:5:8540)
    at R.S (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:110:18463)
    at new Promise (<anonymous>)
    at R (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:110:18443)
    at k.s (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:110:19558)
    at new k (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:110:19433)
    at L.s (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:135:1780)
    at L.createLogger (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:110:4881)
    at new L (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:118:27160)
    at p.j (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:106:1241)
    at /vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:106:2914
    at q.a (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:90:21046)
    at get value [as value] (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:90:21194)
    at Object.get (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:106:3304)
    at new o (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:141:1147)
    at i (/vscode/bin/linux-alpine/8bac42dd1ec2bb223e847a16437b196c040680e5-insider/out/vs/workbench/api/node/extensionHostProcess.js:154:9765)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

If I look at the Git extension I see the following:

Image

deepak1556 commented 1 year ago

Ah missed the logs, jekyll/jekyll:4 is based on alpine-3.15 https://github.com/envygeeks/jekyll-docker/blob/fb892998d444b7b2e4074adeb032197f67853c0a/opts.yml#L1 whereas our server alpine modules are built on alpine-3.16. We don't plan to revert the alpine version as 3.15 is reaching EOL https://www.alpinelinux.org/releases/. I am closing this as designed, please update the jekyll container to use >=3.16