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
Navigation failed because browser has disconnected #3
Comments
Yes,I also met the same issue.Any idea? |
I'm seeing this as well, only on certain websites. Running without the One thing that might be of interest is that running with Any help or insights would be much appreciated! |
Some examples is perhaps a good idea. Sites that causes the error: Sites that does not cause the error: |
I believe I've found a solution to the problem. Use the Hope it works for your use-cases as well! |
Thanks for your help. |
How do we change/increase the default page timeout which is 30 seconds? We could use page.setDefaultNavigationTimeout() but do we have any timeouts that we can set in the browser rather setting it within the page? Please advise. thanks in advance. |
Also I am experiencing performance issues with this chrome. Does anyone experience the same? @serverless-chrome/lambda works faster but I am having issues packaging multiple lambda functions in serverless. |
Just want to mention that i had a similar problem with https://united.com (and the others that @simonklb mentioned), but using both |
@lg Thanks for reporting this, apparently puppeteer silently removed |
I had the same issue. After adding those flags and increasing the lambda memory the problem was still there. After some research I discovered that the error "Navigation failed because browser has disconnected!" was triggered only if the firebase database connection was open. Solution, close the connection before using puppeteer. Hope this helps somebody |
Here, none of Normal puppeter does not crah, even with single-process flag |
Just for the record, that's the error generated by chrome:
|
I had the same issue. Removing all options from
Currently:
Hope this helps somebody. |
@castus that's because you're not testing the right thing. The browser crashes after the navigation has occurred. By removing Try to wait a little bit more before performing any other action on the page and that will fail again. |
I was wrong to assert that this issue only occurs with this build of chrome. I double checked and it also produces normal puppeteer. Opened a ticket on puppeteer directly puppeteer/puppeteer#5487 |
Reading here https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process Also I suspect the crash to happen because a component on this website crashes, getting the only one process allocated to the browser to crash as well. @alixaxel could you please inform us why the single-process flag is important for aws lambda/GCF? It seems it won't fit all situations. Edit: Please, note that I opened a ticket on chromium support https://bugs.chromium.org/p/chromium/issues/detail?id=1060099#c6 |
@gsouf |
@alexfernandez I run on google cloud function and it runs well without single process. But it's slower. |
Solution posted here. @gsouf As @alexfernandez mentioned, without |
I tried adding |
With 3.0.4 Could you share more details / repro of your problem in a new issue? |
Unfortunately I have moved on from it, it's ok just not super stable for my use case. I moved chrome to docker on Fargate service (ECS cluster) and now using Puppeteer code on lambda to drive. Getting no errors, no navigation failed etc. Perhaps chrome inside lambda is a step too much for lambda? also long running task is cheaper than long running lambda. |
For me helped next actions:
Downgrating of pupeteer did't helped for me, so it's my solution. |
Hello there, I am getting the below error when executing your sample code.
{
"errorMessage": "Navigation failed because browser has disconnected!",
"errorType": "Error",
"stackTrace": [
"Connection.NavigatorWatcher._eventListeners.helper.addEventListener (/var/task/node_modules/puppeteer-core/lib/FrameManager.js:1146:117)",
"emitNone (events.js:111:20)",
"Connection.emit (events.js:208:7)",
"Connection._onClose (/var/task/node_modules/puppeteer-core/lib/Connection.js:123:10)",
"WebSocketTransport._ws.addEventListener.event (/var/task/node_modules/puppeteer-core/lib/WebSocketTransport.js:45:22)",
"WebSocket.onClose (/var/task/node_modules/ws/lib/event-target.js:124:16)",
"emitTwo (events.js:126:13)",
"WebSocket.emit (events.js:214:7)",
"WebSocket.emitClose (/var/task/node_modules/ws/lib/websocket.js:172:10)",
"Socket.socketOnClose (/var/task/node_modules/ws/lib/websocket.js:781:15)",
" -- ASYNC --",
"Frame. (/var/task/node_modules/puppeteer-core/lib/helper.js:144:27)",
"Page.goto (/var/task/node_modules/puppeteer-core/lib/Page.js:579:49)",
"Page. (/var/task/node_modules/puppeteer-core/lib/helper.js:145:23)",
"exports.handler (/var/task/index.js:17:20)",
"",
"process._tickDomainCallback (internal/process/next_tick.js:228:7)"
]
}
The text was updated successfully, but these errors were encountered: