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

Test Explorer and GitHub Explorer Stuck in Discovery Mode #236359

Closed
graysddoman opened this issue Dec 17, 2024 · 11 comments
Closed

Test Explorer and GitHub Explorer Stuck in Discovery Mode #236359

graysddoman opened this issue Dec 17, 2024 · 11 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@graysddoman
Copy link

Type: Bug

Since installing the latest update (1.96), both the Test Explorer and GitHub Explorer are stuck in discovery mode and do not complete. Also, not sure if it's related, but the Dev Container I've been running for months has completely died.

VS Code version: Code 1.96.0 (138f619, 2024-12-11T02:29:09.626Z)
OS version: Windows_NT x64 10.0.22635
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12800H (20 x 2803)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.68GB (2.24GB free)
Process Argv --file-uri vscode-remote://dev-container%2B7b22686f737450617468223a22633a5c5c55736572735c5c67646f6d616e5c5c50726f6a656374735c5c50475c5c6668632d69696f742d756e706c616e6e65642d73746f7073222c226c6f63616c446f636b6572223a66616c73652c2273657474696e6773223a7b22636f6e74657874223a226465736b746f702d6c696e7578227d2c22636f6e66696746696c65223a7b22246d6964223a312c22667350617468223a22633a5c5c55736572735c5c67646f6d616e5c5c50726f6a656374735c5c50475c5c6668632d69696f742d756e706c616e6e65642d73746f70735c5c2e646576636f6e7461696e65725c5c646576636f6e7461696e65722e6a736f6e222c225f736570223a312c2265787465726e616c223a2266696c653a2f2f2f632533412f55736572732f67646f6d616e2f50726f6a656374732f50472f6668632d69696f742d756e706c616e6e65642d73746f70732f2e646576636f6e7461696e65722f646576636f6e7461696e65722e6a736f6e222c2270617468223a222f633a2f55736572732f67646f6d616e2f50726f6a656374732f50472f6668632d69696f742d756e706c616e6e65642d73746f70732f2e646576636f6e7461696e65722f646576636f6e7461696e65722e6a736f6e222c22736368656d65223a2266696c65227d7d/workspaces/fhc-iiot-unplanned-stops/fhc-iiot-unplanned-stops.code-workspace --crash-reporter-id 430bbfd2-0ca3-4bbf-a41a-457266e8a089
Screen Reader no
VM 0%
Item Value
Remote Dev Container: Ubuntu @ desktop-linux
OS Linux x64 5.15.167.4-microsoft-standard-WSL2
CPUs 12th Gen Intel(R) Core(TM) i7-12800H (20 x 0)
Memory (System) 15.46GB (11.59GB free)
VM 0%
Extensions (38)
Extension Author (truncated) Version
terraform 4op 0.2.5
codespaces Git 1.17.3
remotehub Git 0.64.0
vscode-drawio hed 1.6.6
vscode-azurevirtualmachines ms- 0.6.6
jupyter-keymap ms- 1.1.2
vscode-ai-remote ms- 1.2.0
remote-containers ms- 0.394.0
remote-ssh ms- 0.116.1
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
vscode-remote-extensionpack ms- 0.26.0
azure-repos ms- 0.40.0
remote-explorer ms- 0.4.3
remote-repositories ms- 0.42.0
remote-server ms- 1.5.2
rewrap stk 1.16.3
vscode-tailwindcss bra 0.12.16
ruff cha 2024.56.0
vscode-markdownlint Dav 0.57.0
vscode-eslint dba 3.0.10
prettier-vscode esb 11.0.0
copilot Git 1.252.0
copilot-chat Git 0.24.2024121201
vscode-pull-request-github Git 0.102.0
vscode-drawio hed 1.6.6
rest-client hum 0.25.1
dotenv mik 1.0.1
vscode-dapr ms- 0.8.0
vscode-docker ms- 1.29.3
vscode-kubernetes-tools ms- 1.3.18
playwright ms- 1.1.12
debugpy ms- 2024.14.0
python ms- 2024.22.0
vscode-pylance ms- 2024.12.1
vscode-yaml red 1.15.0
sonarlint-vscode Son 4.13.2
code-spell-checker str 4.0.21
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

@chrmarti
Copy link
Collaborator

Do the Test Explorer and GitHub Explorer work locally and in WSL?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Dec 18, 2024
@sharmuz
Copy link

sharmuz commented Dec 18, 2024

I'm experiencing the same issue. VS Code is stuck discovering tests - never completes, with an error or otherwise.

Running pytest directly through the integrated terminal works fine. All tests collected and executed as expected.

VS Code version: 1.96.0
OS version: macOS Sequoia 15.1.1

EDIT: I'm not working in a dev container.

@jcorioland
Copy link
Member

Do the Test Explorer and GitHub Explorer work locally and in WSL?

@chrmarti I am experiencing the same issue than @graysddoman and I can confirm that the problem seems to happen in devcontainer, but not in WSL. Also running VSCode 1.96.

@graysddoman
Copy link
Author

Do the Test Explorer and GitHub Explorer work locally and in WSL?

They appear to work locally and in WSL.

The issue appears when I try to work with a Dev Container. The Dev Container worked perfectly fine for months, however this has become unstable since installing the update. I'm using WSL with Ubuntu 24.04. Others in the team are experiencing the same issue as well.

@jcorioland
Copy link
Member

This is the output from python console:

2024-12-18 09:49:51.718 [info] Discover tests for workspace name: all - uri: /workspaces/project-name
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project1 - uri: /workspaces/project-name/src/project1
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project1_api - uri: /workspaces/project-name/src/project1_api
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project2 - uri: /workspaces/project-name/src/project2
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project3 - uri: /workspaces/project-name/src/project3
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project4 - uri: /workspaces/project-name/src/project4
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:49:51.719 [info] Discover tests for workspace name: project5 - uri: /workspaces/project-name/src/project5
2024-12-18 09:49:51.719 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: all - uri: /workspaces/project-name
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project1 - uri: /workspaces/project-name/src/project1
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project1_api - uri: /workspaces/project-name/src/project1_api
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project2 - uri: /workspaces/project-name/src/project2
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project3 - uri: /workspaces/project-name/src/project3
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project4 - uri: /workspaces/project-name/src/project4
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.441 [info] Discover tests for workspace name: project5 - uri: /workspaces/project-name/src/project5
2024-12-18 09:53:28.441 [info] Running discovery for pytest using the new test adapter.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.
2024-12-18 09:53:28.448 [error] Test discovery already in progress, not starting a new one.

and it stays here forever

@adamkaplan
Copy link

I am experiencing the same symptoms and same Pytest discovery log file as above. This coincided with an update to macOS Sequoia the night before.

I have tried clearing ~/Library/Application Support/Code and ~/.vscode, and all caches in the project workspace and restarting my computer.

Also, there are other extensions that don't seem to work (never return results to UI) such as Github Copilot chat, running the Python Debugger, the Source Control commit graph, etc.

@jcorioland
Copy link
Member

Actually seems to be related to the vscode-python extension, check this issue: microsoft/vscode-python#24613 - switching to the pre-release fix the hanging issue in the Test Explorer for me.

@chrmarti
Copy link
Collaborator

Could others seeing this also try with the latest pre-release of the Python extension and let us know if that fixes it? Thanks! /cc @eleanorjboyd

@graysddoman
Copy link
Author

Switching to the pre-release version also stops the hanging issue for me. Thank you! /cc @eleanorjboyd

@chrmarti
Copy link
Collaborator

Great, thanks! Closing as duplicate of microsoft/vscode-python#24613.

If the Python extension is installed automatically with the Dev Container you can add the following to the devcontainer.json to automatically get the pre-release version next time you rebuild:

	"customizations": {
		"vscode": {
			"extensions": [
				"ms-python.python@prerelease"
			]
		}
	}

@eleanorjboyd
Copy link
Member

Hi! For further info see microsoft/vscode-python#24656

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants