microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.99k stars 3.6k forks source link

Text explorer stuck on loading #32100

Closed jessica-dennis closed 1 month ago

jessica-dennis commented 1 month ago

Type: Bug

The test explorer is stuck on loading and this never resolves. I don't know what caused it but I think it started when I was using the debugger and working with a test that had previously been set to test.fail(). Restarting vs code, restarting my machine, editing the playwright config file haven't resolved the problem. Steps to repro:

  1. View test explorer Actual: 'Loading' is displayed and never resolves. It's not possible to view or run any tests from the tree, and projects aren't displayed in the playwright section. Expected: The test tree is displayed and the projects section is populated with checkboxes for each project in playwright config

Screen Shot 2024-08-09 at 16 21 49 PM

Extension version: 1.1.7 VS Code version: Code 1.92.0 (Universal) (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Darwin arm64 23.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 2400)| |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
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|14, 33, 19| |Memory (System)|16.00GB (0.53GB free)| |Process Argv|--crash-reporter-id 8c7247b4-8409-40ff-b6a4-ae628c87c384| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 bdiig495:31013172 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 impr_priority:31102340 nativerepl1:31104043 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31111718 ```
yury-s commented 1 month ago

Can you share code of the project where it happens, so that we could try it locally? Does it happen on a fresh setup on another machine?

yury-s commented 1 month ago

Can you also do cmd-shift-p -> Search Show Logs -> Extension Host and see if there are any errors in the extension logs?

jessica-dennis commented 1 month ago

Hi Yury

Thanks for getting back to me. Unfortunately I can't share the code as it's in a private (work) repo but I'll ask one of my colleagues to try pulling the code on Monday and see if they get the same issue. I'm expecting that they won't because it was working fine for me previously and it doesn't seem to be related to a code change. The logs are as follows: 2024-08-11 17:20:45.907 [info] Extension host with pid 57848 started 2024-08-11 17:20:45.908 [info] Skipping acquiring lock for /Users/JessicaDennis/Library/Application Support/Code/User/workspaceStorage/b5da0034afc9bb43b9aaa6063a4298bd. 2024-08-11 17:20:45.911 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: false, activationEvent: 'onFileSystem:git', root cause: vscode.git 2024-08-11 17:20:45.922 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage' 2024-08-11 17:20:45.953 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:typescript' 2024-08-11 17:20:46.093 [info] ExtensionService#_doActivateExtension vscode.git, startup: false, activationEvent: 'onFileSystem:git' 2024-08-11 17:20:46.239 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*' 2024-08-11 17:20:46.304 [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json' 2024-08-11 17:20:46.375 [info] ExtensionService#_doActivateExtension ms-playwright.playwright, startup: true, activationEvent: 'workspaceContains:**/*playwright*.config.{ts,js,mjs}' 2024-08-11 17:20:46.648 [info] ExtensionService#_doActivateExtension github.vscode-github-actions, startup: true, activationEvent: 'workspaceContains:**/.github/workflows/**' 2024-08-11 17:20:46.701 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github' 2024-08-11 17:20:47.790 [info] Eager extensions activated 2024-08-11 17:20:47.792 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished' 2024-08-11 17:20:47.801 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' 2024-08-11 17:20:47.860 [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished' 2024-08-11 17:20:47.928 [info] ExtensionService#_doActivateExtension ritwickdey.LiveServer, startup: false, activationEvent: 'onStartupFinished'

Also this may not be relevant but I noticed this in the test-results folder. I have a feeling the problem started when I interrupted a (debug) test run that froze after I started manually interacting with the browser while the test was on a breakpoint. It didn't allow me to continue or stop the test so I think I ended up restarting vscode instead. Screen Shot 2024-08-11 at 17 26 44 PM

jessica-dennis commented 1 month ago

Also, my colleague has now pulled the branch and the test explorer loaded with no issues, and the tests run as expected from the command line.

jessica-dennis commented 1 month ago

UPDATE: Just upgraded to 1.46 and it's fixed. Fantastic timing 🎉 Thanks again Yury

yury-s commented 1 month ago

Closing per the response above, feel free to open a new issue if it doesn't work.