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

Using Playwright to connect to a Browserless instance never connects #9223

Closed
stauersbol opened this issue Mar 3, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@stauersbol
Copy link

stauersbol commented Mar 3, 2024

What version of Bun is running?

1.0.29+a146856d1

What platform is your computer?

Linux 6.7.6-arch1-2 x86_64 unknown

What steps can reproduce the bug?

  1. Create bun project
  2. Run browserless in a local docker container, using ghcr.io/browserless/chromium:latest
  3. install playwright
  4. use example code from: https://www.browserless.io/docs/playwright#javascript-playwright
  5. run file with bun run index.js
  6. Connection hangs

What is the expected behavior?

With the example code it should create a screenshot of example.com and save it to the project folder.

What do you see instead?

image
Running with node first, to indicate the expected behaviour

image
Running with bun run index.js, and it never proceeds, (essentially the script never exits until after a timeout or when you terminate the process yourself)

Additional information

The connection when you use pw.chromium.connect() is a WebSocket connection, but it sends a HTTP request instead:
browserless.io:error No route or file found for resource GET: /playwright/chromium +14m, which is incorrect, as that is not a HTTP route but a WebSocket endpoint.

@stauersbol stauersbol added the bug Something isn't working label Mar 3, 2024
@Electroid
Copy link
Contributor

Electroid commented Apr 9, 2024

Duplicate of #9911

@Electroid Electroid marked this as a duplicate of #9223 Apr 9, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
@stauersbol
Copy link
Author

Duplicate of #9223

Just a question, I know this is closed, but why did you mark it as duplicate of the ticket itself?

@odylewski
Copy link

I just faced exactly the same issue on Bun v1.1.7 and browserless v2.8.0.

@Electroid would you be able to link the right ticket? It looks like a problem with how Bun handles websocket connections.

@iSuslov
Copy link

iSuslov commented Nov 25, 2024

@Electroid you marked this issue as a duplicate of itself. Please edit your message and link it to the real duplicate

Duplicate of #9223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants