question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support dynamic WS endpoint by using browserURL

See original GitHub issue

🐛 Bug Report

Puppeteer introduced a new connect property called browserURL which basically does the dynamic WS endpoint fetch for you, see here: https://github.com/GoogleChrome/puppeteer/pull/3558 The problem is that the code adds the browserWSEndpoint no matter what config you give it, see: https://github.com/smooth-code/jest-puppeteer/blob/master/packages/jest-environment-puppeteer/src/PuppeteerEnvironment.js#L40

I’m running chrome in a docker container (https://hub.docker.com/r/justinribeiro/chrome-headless/) so basically my config is just:

connect: {
    browserURL: 'http://127.0.0.1:9222'
}

When running my tests, I’m getting this error:

TypeError: Cannot read property 'removeListener' of undefined

This happens because launching puppeteer fails and the exception is never catched so teardown happens:

Error: Exactly one of browserWSEndpoint, browserURL or transport must be passed to puppeteer.connect

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shaykecommented, Mar 27, 2019

I’m pretty sure this is now fixed due to #212 no? I’ve opened this ticket before those changes in the code where the browserWSEndpoint was always provided to puppeteer.

0reactions
lukaszfiszercommented, Mar 27, 2019

@shayke yeah, #212 definitely fixes this, so I guess @neoziro can now close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I dynamically switch web service addresses in .NET ...
When you generate a web reference and click on the web reference in the Solution Explorer. In the properties pane you should see...
Read more >
How to make WSDL URL dynamic in Web Service Proxy ...
For a web service based datawindow, you can use the WebServiceConnection object to configure the endpoint dynamically. That should be the only ...
Read more >
Creating Dynamic Proxy Clients
A dynamic proxy client enables a Web Service client to invoke a Web Service based on a service endpoint interface (SEI) dynamically at...
Read more >
Implementing dynamic JAX-WS web services clients - IBM
You can develop dynamic web services clients based on the Web Services for Java Platform, Enterprise Edition (Java EE) specification and the ...
Read more >
[wdio-devtools-service] Support CDP on Selenium 4 Grid #6470
In your PR, I can see a user can add in capabilities an address to contact the remote cdp endpoint. The issue with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found