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 works locally but fails on CI #1848

Closed
Gbahdeyboh opened this issue Apr 17, 2020 · 5 comments
Closed

Playwright works locally but fails on CI #1848

Gbahdeyboh opened this issue Apr 17, 2020 · 5 comments

Comments

@Gbahdeyboh
Copy link

Context:

  • Playwright Version: 0.13.0
  • Operating System: Linux

Describe the bug

Playwright works normally locally, but when on the CI. The browser fails to Open. I get the error
TypeError: Cannot read property 'newContext' of undefined

The full log can be found here.

And I'm not exactly sure why this works locally and not on CI.

@aslushnikov
Copy link
Collaborator

Hey @Gbahdeyboh,

I see there's the following line in the log:

browser = await Browser.startBrowser( 'chromium' );

which doesn't look like Playwright. Do you wrap it into something? Where can I get to look at the code?

@Gbahdeyboh
Copy link
Author

Yes, I created a separate route to start the browser.

You can check the Browser class code here.

The whole code is here In case you need and other info from the code.

@Gbahdeyboh
Copy link
Author

I stopped the use of the Browser class I wrapped around playwright to see if I was doing something wrong and I get a new kind of error here

(node:2725) ExperimentalWarning: The fs.promises API is experimental

Full error here

@aslushnikov
Copy link
Collaborator

@Gbahdeyboh I'm sorry I didn't follow up on this. Is this still relevant?

@Gbahdeyboh
Copy link
Author

No, not at all.
Just in case anyone else experiences the same issue, fs.promises(which playwright uses) is only stable in Node erbium(v12) upwards. I was also missing some Docker CI config, see here for correct configurations for your CI

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

No branches or pull requests

2 participants