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

Playwright times out due to bad default port setting #5429

Closed
kyllerss opened this issue Jul 8, 2022 · 3 comments · Fixed by #5433
Closed

Playwright times out due to bad default port setting #5429

kyllerss opened this issue Jul 8, 2022 · 3 comments · Fixed by #5433
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Milestone

Comments

@kyllerss
Copy link

kyllerss commented Jul 8, 2022

Describe the bug

When I add vitest integration to a skeleton SvelteKit project, playwright ceases to work - I get a connection timeout.

Reproduction

I have created the following project that illustrates the problem:

https://github.com/kyllerss/sveltekit-vitest-and-playwright.

Logs

Running 1 test using 1 worker

[WebServer] (node:18795) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[WebServer] (node:18807) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[WebServer] Generated an empty chunk: "hooks"
[WebServer] (node:18807) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
[WebServer] (node:18842) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[WebServer] (node:18854) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

Error: Timed out waiting 60000ms from config.webServer.

System Info

N/A

Severity

serious, but I can work around it

Additional Information

No response

@kyllerss
Copy link
Author

kyllerss commented Jul 8, 2022

I ran into this issue when following the guidance from Issue #5094.

@philip-weber
Copy link
Contributor

It seems the problem was introduced in PR #5392. The problem does not come from using playwright together with vitest but because the port for the preview server was changed in PR #5392. sveltekit used the port 3000 for the dev server and the preview server. vite, on the other hand, uses port 3000 for the dev server and port 4173 for the preview server. You need to change the port in your playwright.config.ts to port: 4173. I guess this needs to be changed in the template.

@benmccann benmccann added the bug Something isn't working label Jul 8, 2022
@benmccann benmccann changed the title Playwright times out when Vitest integration present. Playwright times out due to bad default port setting Jul 8, 2022
@benmccann benmccann added the p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. label Jul 8, 2022
@benmccann benmccann added this to the 1.0 milestone Jul 8, 2022
@kyllerss
Copy link
Author

kyllerss commented Jul 8, 2022

Thank you for the fast turn-around! Works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants