R
Railway3mo ago
turck

Browserless v1 template with Typescript

I am getting /playwright 404 Not Found when connecting to the deployment
3 Replies
Percy
Percy3mo ago
Project ID: 6b93338d-555d-4ee7-b530-6ea7e65afef1
turck
turckOP3mo ago
6b93338d-555d-4ee7-b530-6ea7e65afef1
import { chromium } from "playwright";

...

const browser = await chromium.connect(
process.env.BROWSER_PLAYWRIGHT_ENDPOINT as string
);
import { chromium } from "playwright";

...

const browser = await chromium.connect(
process.env.BROWSER_PLAYWRIGHT_ENDPOINT as string
);
results in:
- <ws connecting> wss://browserless-52ol-production.up.railway.app/playwright
- <ws unexpected response> wss://browserless-52ol-production.up.railway.app/playwright 404 Not Found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /playwright</pre>
</body>
</html>

- <ws error> wss://browserless-52ol-production.up.railway.app/playwright error WebSocket was closed before the connection was established
- <ws connect error> wss://browserless-52ol-production.up.railway.app/playwright WebSocket was closed before the connection was established
- <ws disconnected> wss://browserless-52ol-production.up.railway.app/playwright code=1006 reason=
- <ws connecting> wss://browserless-52ol-production.up.railway.app/playwright
- <ws unexpected response> wss://browserless-52ol-production.up.railway.app/playwright 404 Not Found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /playwright</pre>
</body>
</html>

- <ws error> wss://browserless-52ol-production.up.railway.app/playwright error WebSocket was closed before the connection was established
- <ws connect error> wss://browserless-52ol-production.up.railway.app/playwright WebSocket was closed before the connection was established
- <ws disconnected> wss://browserless-52ol-production.up.railway.app/playwright code=1006 reason=
upstream repo: railwayapp-templates/browserless No luck after switching from bun to npm and ensuring that client and server version match
Brody
Brody3mo ago
I was unabe to reproduce this with the browserless v1 template and the example code here - https://github.com/brody192/playwright-example
Want results from more Discord servers?
Add your server