[BUG] VSCode Extension broken with Playwright 1.34.1
System info
- Playwright Version: v1.34.1
- Operating System: Windows 11
- Browser: -
- Other info:
- VS Code: 1.78.2
- Playwright Test for VSCode: 1.0.11
Source code
- [x] I provided exact source code that allows reproducing the issue locally.
Link to the GitHub repository with the repro
https://github.com/rothsandro/repro.playwright-vscode
Steps
- Create a new folder and run
npm init -y - Run
npm init playwright@latestand accept all default values - Open the folder in VS Code
- Install Playwright Test for VSCode extension
- Open the Playwright panel to see all tests
Expected
The extension should show the example test.
Actual
- No tests are shown
- A toast "Please install Playwright Test ..." is shown
The problem only occurs with the latest version 1.34.1 of Playwright. It works when installing the previous version 1.34.0
Same here (Apple M1 MacBook Pro, macOS Ventura 13.4, vscode v1.78.2, PW Test for vscode v1.0.11).
Also seeing this on Ventura 13.3.1, vscode 1.78.2, Playwright 1.34.1, vscode PW Test extension v1.0.11.
I noticed this error in the vscode output tab under the "Window" section:
[error] [Extension Host] SyntaxError: Unexpected token 'u', "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at Oe.getPlaywrightInfo (/Users/{name}/.vscode/extensions/ms-playwright.playwright-1.0.11/out/extension.js:14:4037)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at We._rebuildModel (/Users/{name}/.vscode/extensions/ms-playwright.playwright-1.0.11/out/extension.js:84:13618)
at We.activate (/Users/{name}/.vscode/extensions/ms-playwright.playwright-1.0.11/out/extension.js:84:12827)
This might be caused by #23203, which changed the import path used by the extension here from @playwright/test/cli to @playwright/test/lib/cli (the "./cli": "./cli.js" entry was deleted from package.json).
Same problem for v1.34.2
Works fine for me with v1.34.2