playwright: [Bug]: New install "Internal error: unable to connect to the test serverplaywright"

Version

1.41.1

Steps to reproduce

playwright@1.0.0 C:\Code\playwright ±- @playwright/test@1.44.1 `-- @types/node@20.14.2

  1. Create a new folder
  2. install the playwright extension
  3. Add playwright to the project and i get the error in the file playwright.config.js [{ “resource”: “/c:/Code/playwright/playwright.config.js”, “owner”: “pw.testErrors.diagnostic”, “severity”: 8, “message”: “Internal error: unable to connect to the test server”, “source”: “playwright”, “startLineNumber”: 1, “startColumn”: 1, “endLineNumber”: 1, “endColumn”: 1 }]

Expected behavior

installation works. Clearly it’s some kind of issue with my environment, but i have no error messages or information to try to figure out why. Tried it on a new system install and no problem, so somehow my system is affecting the install.

System is Windows 11, with MySQL, Visual Studio (C#) and a number of other products installed

Actual behavior

[{ “resource”: “/c:/Code/playwright/playwright.config.js”, “owner”: “pw.testErrors.diagnostic”, “severity”: 8, “message”: “Internal error: unable to connect to the test server”, “source”: “playwright”, “startLineNumber”: 1, “startColumn”: 1, “endLineNumber”: 1, “endColumn”: 1 }]

Additional context

No response

Environment

System is Windows 11, with MySQL, Visual Studio (C#) and a number of other products installed

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (3 by maintainers)

Most upvoted comments

I had the same issue. I renamed the file from Playwright.config.js to Playwright.configs.js and it worked. Not getting “Internal error: unable to connect to the test serverplaywright”

I encountered the same issue. I am using fnm and have Node.js v23.1.0 installed.

In my case, the issue was resolved when I uninstalled the older version of Node.js (v16.13.0) that had been installed using the .msi installer.

I hope this information is helpful!

I had the same issue. I renamed the file from Playwright.config.js to Playwright.configs.js and it worked. Not getting “Internal error: unable to connect to the test serverplaywright”

It works for me. But why ?

I had the same issue. I renamed the file from Playwright.config.js to Playwright.configs.js and it worked. Not getting “Internal error: unable to connect to the test serverplaywright”

This will not fix the issue, as playwright will not be able to see your config (which the correct filename is playwright.config.ts or playwright.config.js.

Just checked, the test tab will not display your tests and will ignore your config with playwright.configs.js

I have another extension of test runner installed, so that’s why test tab was not missing. However you are correct, I have updated the node version and that error is not happening. Thanks!

those commands produce the same error. On other machines it’s fine, there is something about this machine and it’s setup. It’s used for a lot of other development things (Visual Code, MySQL +++ ), so probably something there is affecting it. I’ve checked event logs, rebooted, disabled all kinds of stuff, as much as i can to see what could be the issue. I will probably just reinstall the machine and start over. Thank you for lookingBest,Mark

On Wednesday, June 12, 2024 at 10:57:13 AM PDT, Yury Semikhatsky ***@***.***> wrote:  

Hmm, this I can’t reproduce. Just to double check, are you doing exact following steps?

  • npm init playwright newplaywright
  • cd newplaywright
  • code .
  • Click on green triangle on one of the test’s gutter to run it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>