-
Notifications
You must be signed in to change notification settings - Fork 26
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
Puppeteer crash due to dev profile error #19
Comments
I'm not sure about this. But I guess it's something to do with |
thanks so much for the prompt reply, let me try the new fix |
Hey, after a few times of browser reinit, puppeteer still crash `/root/apps/translateer/node_modules/@puppeteer/browsers/lib/cjs/launch.js:271 Error: Failed to launch the browser process! undefined |
May I ask:
|
Here is another issue related: puppeteer/puppeteer#10517 I guess it's a problem with the new introduced to: headless: true, and rebuild with |
|
let me try this now, thanks |
This function did have a flaw. I just pushed a commit. Could you try again? Specifically, it might due to the reiniting happens before the old browsers compleletly closing. |
Great, trying now, will update how it goes |
You could shorten the reiniting time to test :) |
Oh yes, silly me :) |
I reduced the reiniting time and tested so it looks good now "res":{"statusCode":500},"err":{"type":"TargetCloseError","message":"Target closed","stack":"TargetCloseError: Target closed\n at /root/apps/translateer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:192:51\n at /root/apps/translateer/node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:1:732\n at Array.map ()\n at Object.emit (/root/apps/translateer/node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:1:716)\n at CdpCDPSession.emit (/root/apps/translateer/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:91:23)\n at CdpCDPSession._onClosed (/root/apps/translateer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:115:14)\n at Connection.onMessage (/root/apps/translateer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:132:25)\n at WebSocket. (/root/apps/translateer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:52:32)\n at callListener (/root/apps/translateer/node_modules/ws/lib/event-target.js:290:14)\n at WebSocket.onMessage (/root/apps/translateer/node_modules/ws/lib/event-target.js:209:9)","name":"TargetCloseError"},"msg":"Target closed"} |
Glad to know it solves the issue.
Because in that period, the browser is restarting so can't reach to the web page. We have to do the restarting approach because of a memory leak issue reported a while ago. I'll see if I could improve it a little bit later. |
My proposal:
|
I'm running Translateer using Option 2, Serve locally.
After a while, the app crashed and showed below error
`/root/apps/translateer/node_modules/@puppeteer/browsers/lib/cjs/launch.js:271
reject(new Error([
^
Error: Failed to launch the browser process! undefined
[1301414:1301414:1205/220205.443107:ERROR:process_singleton_posix.cc(335)] Failed to create /tmp/puppeteer_dev_profile-IEw0m8/SingletonLock: No such file or directory (2)
[1301414:1301414:1205/220205.443424:ERROR:chrome_main_delegate.cc(553)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.`
The text was updated successfully, but these errors were encountered: