browserless (puppeteer) issues
project id:
168b11d7-f1cd-4066-91c0-fd9530f55259
i have a headless puppeteer project and am trying to switch over to browserless (v2) having issues when swapping the code:
received error on the puppeteeer.connect
call:
confirmed the BROWSER_WS_ENDPOINT is correct (i even copied the wss: directly in case the env vars weren't passing thru)Solution:Jump to solution
@bonky - template has been fixed, please hard refresh your browser before you deploy the template again
23 Replies
Project ID:
168b11d7-f1cd-4066-91c0-fd9530f55259
i followed the example here:
https://github.com/brody192/puppeteer-example
basically just replaced puppeteer.launch with connect, but seems to have issues
i had it running successfully with headless locally, but tried to convert to browserless to make it workable with railway, but getting this 404 error
i tried running your example @Brody and having the same exact error "Unexpected server response: 404" on the
puppeteer.connect
call, using this simple example:
yep I am aware of the issue and will be fixing it when I'm back from PTO
opps sorry to bother didnt know u were on PTO, when u get back?
this Friday, so I should be fixed saturday at the minimum
great thank u, enjoy the rest of your pto
thank you!
Solution
@bonky - template has been fixed, please hard refresh your browser before you deploy the template again
i am still getting 404, what dou mean by hard refresh? i tried redeploying
i tried redeploying the
Browserless
app, is that what u mean?you need to redeploy the template
not your pre existing deployment
like create from scratch?
ah okay gotcha
correct, delete that and deploy the template again
and a hard refresh is a key combo that refreshes the page without cache
do i do v2 or v1?
GitHub
GitHub - railwayapp-templates/browserless-v2: Deploy Browserless on...
Deploy Browserless on Railway. Web browser automation built for everyone, and loved by developers. - railwayapp-templates/browserless-v2
up to you, v2 dropped support for selenium iirc
thank u it worked! everything is good now :thumbs:
appreciate your help
awsome!
i also have this for testing going forward
this is awesome~
dumb question -- how do i expose the railway URL of a project as an env variable? how does it know its own url?
how does browserless expose its own url as env var:
wss://browserless-production-823f.up.railway.app
not a dumb question, it uses the reference variable
RAILWAY_PUBLIC_DOMAIN
you can view the raw editor to see how it's all pieced together.
docs here - https://docs.railway.app/reference/variables#railway-provided-variablesperfect thank you!
great service, as always. loyal customer since 2021 :salute:
please close this thread, issue resolved
sounds good! happy to help 🙂