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

Example works only with default port 3000 #37952

Closed
1 task done
damianobarbati opened this issue Jun 23, 2022 · 2 comments
Closed
1 task done

Example works only with default port 3000 #37952

damianobarbati opened this issue Jun 23, 2022 · 2 comments
Labels
bug Issue was opened via the bug report template.

Comments

@damianobarbati
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64
    Binaries:
      Node: 16.14.2
      npm: 8.5.0
      Yarn: 1.22.18
      pnpm: N/A
    Relevant packages:
      next: 12.1.7-canary.45
      react: 17.0.2
      react-dom: 17.0.2

Which example does this report relate to?

with-playwright-app

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

yarn test:e2e

Describe the Bug

Playwright fails because it fails to detect when webserver starts.

Expected Behavior

Playwright should succeed.

To Reproduce

Set the port to 80 instead of leaving the default 3000, changing these 2 lines:

Run DEBUG=pw:webserver yarn test:e2e.

It fails because the WebServer available event is never fired.

@damianobarbati damianobarbati added the bug Issue was opened via the bug report template. label Jun 23, 2022
thebergamo pushed a commit to thebergamo/next.js that referenced this issue Jun 28, 2022
thebergamo pushed a commit to thebergamo/next.js that referenced this issue Jun 29, 2022
@thebergamo
Copy link
Contributor

In general I believe this has something to do with Playwright other than Next.js itself.
After some testing I manage to make it running, but instead of specifying port itself you should use use.baseURL and webServer.url that would help to make it running without issues.

Please take a look in this file from my fork: https://github.com/vercel/next.js/blob/657663770e6eb0bbeab3b1a771c53519378f386e/examples/with-playwright/playwright.config.ts

This works correctly.

@kodiakhq kodiakhq bot closed this as completed in 34e296b Jul 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants