Closed samueldietrick closed 3 years ago
Estou com o mesmo erro, pelo que entendi é algo relacionado ao puppeteer/chromium.
Chrome is downloaded but fails to launch on Node.js 14 If you get an error that looks like this when trying to launch Chromium:
(node:15505) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! spawn /Users/.../node_modules/puppeteer/.local-chromium/mac-756035/chrome-mac/Chromium.app/Contents/MacOS/Chromium ENOENT This means that the browser was downloaded but failed to be extracted correctly. The most common cause is a bug in Node.js v14.0.0 which broke extract-zip, the module Puppeteer uses to extract browser downloads into the right place. The bug was fixed in Node.js v14.1.0, so please make sure you're running that version or higher. Alternatively, if you cannot upgrade, you could downgrade to Node.js v12, but we recommend upgrading when possible.
Tentei a versão 12 do node, também sem sucesso.
Segue meu LOG:
nodemon dist/server.js
[nodemon] 2.0.12
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node dist/server.js
[1629942119648] INFO: Server started on port: 8080
(node:10276) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[0825/224159.801926:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Received signal 6
r8: 0000000000000000 r9: 00007fffe4c12c00 r10: 0000000000000008 r11: 0000000000000008 r12: 00007fffe4c13ed0 r13: 00007fffe4c12e60 r14: 00007fffe4c13ee0 r15: aaaaaaaaaaaaaaaa di: 0000000000000002 si: 00007fffe4c12c00 bp: 00007fffe4c12e50 bx: 00007fffe4c13690 dx: 0000000000000000 ax: 0000000000000000 cx: 0000000000000008 sp: 00007fffe4c12c00 ip: 00007f821e2aefb7 efl: 0000000000000246 cgf: 00000053002b0033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace]
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/home/temuge/whaticket/backend/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/home/temuge/whaticket/backend/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (events.js:326:22)
at Interface.EventEmitter.emit (domain.js:483:12)
at Interface.close (readline.js:416:8)
at Socket.onend (readline.js:194:10)
at Socket.emit (events.js:326:22)
at Socket.EventEmitter.emit (domain.js:483:12)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:10276) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10276) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
voce precisa atualizar seu node e o navegador tambem !
A versão do node está 14.17.5 a do chromium não consegui identificar, mas rodei a instalação e fiz todos updates, mesmo assim o erro continua, acontece o erro quando deveria gerar o QRcode.
Limpou a instalação e o cache apos o update ? Se precisar de ajuda me chama no whatsapp que entro ai e vejo pra você meu amigo !!! 65996657313
Rodou sem problemas no mint com instalação limpa, antes estava tentando rodar o WSL2 no Windows 10 que ainda não funcionou, muito obrigada pela ajuda Rodrigo.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Disponha!
Infelizmente estou com este mesmo problema e atualizei tudo e nada. Qual melhor saida?
[1631980379569] INFO: Client disconnected [1631980379571] INFO: Client disconnected UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! [0918/155121.241566:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See ht tps://crbug.com/638180.
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/root/whaticket/backend/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/root/whaticket/backend/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:1 87:68)
at Interface.emit (events.js:412:35)
at Interface.emit (domain.js:532:15)
at Interface.close (readline.js:451:8)
at Socket.onend (readline.js:224:10)
at Socket.emit (events.js:412:35)
at Socket.emit (domain.js:532:15)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use node --trace-warnings ...
to show where the warning was created)
(node:26113) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing i nside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To te rminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https:/ /nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:26113) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejecti ons that are not handled will terminate the Node.js process with a non-zero exit code.
UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process![1631980379565]TROUBLESHOOTING^Z
[1]+ Stopped npm start
root@whatsapp-ticket:~/whaticket/backend# node -v
v14.17.6
root@whatsapp-ticket:~/whaticket/backend#
Estou com mesmo problema do leandro. alguem conseguiu resolver?
Estou com mesmo problema do leandro. alguem conseguiu resolver?
Isso ocorre porque você está executando o projeto com o usuário root. Utilize um usuário comum que tudo deve funcionar. Em questão do QRCODE consegui resolver com isso.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Ola, boa noite a todos, fiz a instalação limpa e tudo ok, porem não esta gerando o Qr Code, ja pesquisei muito aqui e não entendi como que resolvo isso, tem algum que poderia me dar uma força?
Ola, boa noite a todos, fiz a instalação limpa e tudo ok, porem não esta gerando o Qr Code, ja pesquisei muito aqui e não entendi como que resolvo isso, tem algum que poderia me dar uma força?
Conseguiu resolver?
Qual ambiente você está usando, para mim funcionou com tudo instalado em um Linux nativo, no WSL2 não funcionava a geração do QRcode.
Tenta rodar novamente sem ser como ROOT. Aqui deu certo! :)