Puppeteer Error

My application is an HTML report generator converted to PDF using Puppeteer. The application works normally, but sometimes the error "platform_thread_posix.cc(129)" occurs. Apparently, it is related to the Unix/Linux operating system and happens when there is a failure to create a new thread in the operating system. This error causes the application to freeze and no longer be able to generate reports. To resolve it, it is necessary to restart the application. Is there any way to solve it without restarting the application? Project Id: 629f3295-3910-432e-a3cd-d5fbc0586c5b
15 Replies
Percy
Percy17mo ago
Project ID: 629f3295-3910-432e-a3cd-d5fbc0586c5b
Brody
Brody17mo ago
that's not much information to go off of mate
jeffersonmoreira
jeffersonmoreira17mo ago
This is log Error: Navigation failed because browser has disconnected! at /app/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:51:147 at /app/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:62 at Array.map (<anonymous>) at Object.emit (/app/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:43) at CDPSession.emit (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/EventEmitter.js:72:22) at CDPSession._onClosed (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:271:14) at Connection._onClose (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:144:21) at WebSocket.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:17:30) at WebSocket.onClose (/app/node_modules/puppeteer/node_modules/ws/lib/event-target.js:210:18) at WebSocket.emit (events.js:315:20) Error: Failed to launch the browser process! [0607/132825.139928:WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig. [0607/132825.141104:ERROR:platform_thread_posix.cc(129)] pthread_create: Resource temporarily unavailable (11) [0607/132825.142002:ERROR:platform_thread_posix.cc(129)] pthread_create: Resource temporarily unavailable (11) [0607/132825.142555:ERROR:platform_thread_posix.cc(129)] pthread_create: Resource temporarily unavailable (11) [0607/132825.146542:ERROR:platform_thread_posix.cc(129)] pthread_create: Resource temporarily unavailable (11) [0607/132825.146585:FATAL:backend_impl.cc(120)] Check failed: StartWithOptions(base::Thread::Options(base::MessagePumpType::IO, 0)). Received signal 6 r8: 00007fd4cc80e9a4 r9: 0000557a4ef5cf00 r10: 0000000000000008 r11: 0000000000000246 r12: 0000557a4ef54dd8 r13: 00007fd4cc80f030 r14: 00007fd4cc80ee20 r15: 0000000000000085 di: 0000000000000002 si: 00007fd4cc80e870 bp: 00007fd4cc80e870 bx: 0000000000000000 dx: 0000000000000000 ax: 0000000000000000 cx: 00007fd4d377c9f3 sp: 00007fd4cc80e868 ip: 00007fd4d377c9f3 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated.
Brody
Brody17mo ago
are you making sure to close chrome after every pdf conversion?
jeffersonmoreira
jeffersonmoreira17mo ago
Yes. There is a function for that.
Brody
Brody17mo ago
does the function work?
jeffersonmoreira
jeffersonmoreira17mo ago
Brody
Brody17mo ago
but does it actually close the browser
jeffersonmoreira
jeffersonmoreira17mo ago
it's supposed to work. I will test again
Brody
Brody17mo ago
after browser close check if chrome still running, run a shell command to check for chrome or something like that
jeffersonmoreira
jeffersonmoreira17mo ago
Ok Is it possible to run command inside the application's docker?
Brody
Brody17mo ago
with node yes don't know the api for it off the top of my head, something like shell.exec
jeffersonmoreira
jeffersonmoreira17mo ago
thks I will add a kill pid function in the code
Brody
Brody17mo ago
sounds god
jeffersonmoreira
jeffersonmoreira17mo ago
😅
Want results from more Discord servers?
Add your server