microsoft / playwright-testing-service

MIT License
70 stars 10 forks source link

[BUG]:[Getting certificate error while connecting to playwright service] #104

Closed sgollapa closed 1 month ago

sgollapa commented 2 months ago

Describe the bug I have provided my access token and added region endpoint in the setup. Now when I am executing the test to connect to playwright service, its throwing a certificate error.

To Reproduce Steps to reproduce the behavior:

  1. create playwright.service.config.ts
  2. create .env file
  3. provide access token generated from playwright service and add region end point url in the .env
  4. Run "npx playwright test --config=playwright.service.config.ts --workers=2"

Expected behavior Playwright tests should be executed and playwright service should be connected with test results displayed in playwright service.

Screenshots If applicable, add screenshots to help explain your problem.

Setup information (please complete the following information):

Additional context Add any other context about the problem here.

puagarwa commented 2 months ago

Hi , can you please provide below information Subscription id: Error message and/or stacktrace

sgollapa commented 2 months ago

Hi , can you please provide below information Subscription id: Error message and/or stacktrace Hi Puneet, tried attaching the screenshot but failed. please find below the details: Subscription id: b060cfe5-9862-43e2-b7dd-de2d40ea480b

error: npx playwright test --config=playwright.service.config.ts --workers=2

Running 2 tests using 2 workers 1) [chromium] › example.spec.ts:10:5 › get started link ──────────────────────────────────────────

Error: browserType.connect: WebSocket error: unable to get local issuer certificate
Call log:
  - <ws connecting> wss://eastasia.api.playwright.microsoft.com/api/authorize/connectSession
  - <ws error> wss://eastasia.api.playwright.microsoft.com/api/authorize/connectSession error unable to get local issuer certificate
  - <ws connect error> wss://eastasia.api.playwright.microsoft.com/api/authorize/connectSession unable to get local issuer certificate
puagarwa commented 2 months ago

Hi @sgollapa, We verified on our service side that our SSL cert is in good shape and other customers are also able to use it. It could be some issue at your client machine or network restriction which is facing problem getting certification chain.

puagarwa commented 2 months ago

HI @sgollapa , One more thing, if above suggestion didnt work then please help enable debug logs via below method and share with us at our email alias Set environment variable DEBUG=pw:* DEBUG_FILE=log.log

then, send us log.log file at playwrighttesting@microsoft.com

puagarwa commented 2 months ago

Hi @sgollapa, If you are still facing the issue then please help us with above logs to debug the issue.

sgollapa commented 2 months ago

Hi @puagarwa , Apologies for the delay. This issue seems to be due to some firewall in the network, our networking team is looking into it. I have tested this from one of our jumphosts and it worked fine. I was able to run and test the playwright.service.config.ts and able to see the dashboard with test run. I shall update you once the connectivity issue is resolved.

puagarwa commented 1 month ago

HI @sgollapa, Just checking if you were able to resolve the issue with your networking team. Let me know if you need any help.

sgollapa commented 1 month ago

Hi @puagarwa , This issue is resolved from the jumphost and issue testing it from local network is still pending. This issue can be closed currently as there is a wait time to check the issue in local. I shall raise further request if I need support from Microsoft. Thank you.