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

Run in web #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Run in web #73

wants to merge 3 commits into from

Conversation

elazarcoh
Copy link
Collaborator

@elazarcoh elazarcoh commented Apr 17, 2023

This is intended as an replacement PR for #39 which got messed up with conflicts.

@jgclark @alkatar21 can you look at it? I added a vsix as well.

@jgclark
Copy link
Owner

jgclark commented Apr 17, 2023

I've been trying for 30 minutes to test this in one of the web test environments, using various methods listed at https://code.visualstudio.com/api/extension-guides/web-extensions#web-extension-tests.
I think it does install OK, but I can't get further to actually test it in use.
Which method did you use to test it @elazarcoh?

But the good news is that this PR runs OK for me locally, and doesn't exhibit the same single-digit highlighting problem as I was reporting on #39.

@elazarcoh
Copy link
Collaborator Author

elazarcoh commented Apr 18, 2023

vscode-test-web --browserType=chromium --extensionDevelopmentPath=$extensionLocation $testDataLocation
described in https://github.com/microsoft/vscode-test-web.
this opens a web browser with vscode, in the given folder, where I put my .vscode/settings.json for testing.

We can add it in a launch.json to make it easier to debug.

@jgclark
Copy link
Owner

jgclark commented Apr 18, 2023

Thanks. Sounds like I'd been doing the right thing. I'd tried a variety of browserTypes as well, given the following warning about Playwright which I couldn't get to go away. I consistently get variations of this error (when running from my local GH directory with the vsix file in):

vscode-test-web --extensionDevelopmentPath=. .
@vscode/test-web: 0.0.15
Serving dev extensions from /Users/jonathan/GitHub/vscode-todo-highlight
Serving local content /Users/jonathan/GitHub/vscode-todo-highlight at /static/mount
Listening on http://localhost:3000
(node:47141) UnhandledPromiseRejectionWarning: browserType.launch: Executable doesn't exist at /Users/jonathan/Library/Caches/ms-playwright/chromium-907428/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers:              ║
║                                                                         ║
║     npx playwright install                                              ║
║                                                                         ║
║ <3 Playwright Team                                                      ║
╚═════════════════════════════════════════════════════════════════════════╝
    at openBrowser (/opt/homebrew/lib/node_modules/@vscode/test-web/out/index.js:99:59)
    at open (/opt/homebrew/lib/node_modules/@vscode/test-web/out/index.js:76:27)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:47141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:47141) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C

I then remembered I'm running node v14.x (a requirement on the other project I contribute to), so I switched up to node 19.9.0, and updated everything, and then I get Chromium spinning up on localhost:3000 without errors, but it only gives a blank screen without any hint of VSCode other than its favicon. Passing different folders for test data doesn't help.

@elazarcoh
Copy link
Collaborator Author

try to open the dev tools (f12) and see if there are errors that make sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants