Closed myhardez closed 3 years ago
Short answer is yes, you can run on Ubuntu 20.04 with no GUI. I run it with no problems at all. And make sure you had already installed the dependencies mentioned on this link. Take a look at Debian section.
From your log, it seems you run with root user, have you tried using non-root user?
thank you sir
this is puppeteer/chromium related. to solve it, you need to read about how to enable chromium sandbox on your OS, or run it without sandbox using root.
thank you sir
How to solve this?
solution: puppeteer: {headless: true}
let client = new Client({
session: session,
//qrTimeoutMs: 120000,
//authTimeoutMs: 120000,
//restartOnAuthFail: true,
//takeoverOnConflict: true
//takeoverTimeoutMs: 5000
puppeteer: {headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-extensions']}
});
Simple boilerplate for only terminal instance: ameybhavsar24/ww-bot/index.js
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.
const client = new Client({ restartOnAuthFail: true, puppeteer: { headless: true, args: [ '--no-sandbox', '--disable-setuid-sandbox', ], }, session: sessionCfg });
I try again, but have error please help me
Insira essa linha em seu args
:
'--disable-extensions'
Além disso, você precisa instalar o chromium em seu servidor:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f
Depois de ter instalado o chromium, você precisa habilita-lo:
node node_modules/puppeteer/install.js
Hi guys, can you show your dockerfile with whatsapp-web.js. I have troubles with running application on Ubuntu. Its well work on windows but on Ubuntu doesn't work properly. I saw 2 errors with running whatsapp-web.js on linux: 1) Error: Failed to launch the browser process! /node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
2) ERR_CONNECTION... web.whatsapp.com (application don't send QR in a few minutes and than send error)
solution:
puppeteer: {headless: true}
let client = new Client({ session: session, //qrTimeoutMs: 120000, //authTimeoutMs: 120000, //restartOnAuthFail: true, //takeoverOnConflict: true //takeoverTimeoutMs: 5000 puppeteer: {headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-extensions']} });
This solution work for me on Debian Linux 10... if still not work, try install dependencies based on https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
@i9team Yours is the only solution that works here for me, thanks!
Well, really a combination of all options work 😜
puppeteer: {
headless: true,
ignoreHTTPSErrors: true,
args: [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-extensions",
],
},
Hello, The error no longer appears but now the result does not appear. It just goes black and I don't know what's happening.
Hello, The error no longer appears but now the result does not appear. It just goes black and I don't know what's happening.
I've the same problem, did you solve it?
Si solucione, mandame un correo y te mando el codigo de conexion
Enviame el problema que presentas
El mié, 16 oct 2024 a la(s) 3:30 p.m., Jossy Xavier Melgar Molina ( @.***) escribió:
Si solucione, ya te mando el codigo
El mié, 16 oct 2024 a la(s) 10:46 a.m., KreK93 @.***) escribió:
[image: image] https://private-user-images.githubusercontent.com/64379331/285087960-91b1f3b4-5843-4016-a3d9-7041f9b4650d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkwOTU3NjAsIm5iZiI6MTcyOTA5NTQ2MCwicGF0aCI6Ii82NDM3OTMzMS8yODUwODc5NjAtOTFiMWYzYjQtNTg0My00MDE2LWEzZDktNzA0MWY5YjQ2NTBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE2VDE2MTc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxODFlZGIwOTZhYjY2NjdlMGNjNGJjZTU0NDY2NTk4NTkxYmUzMmU1ODVmMjdmNzdjZmZkZjJhYTY0YjlmZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IdBOH3GV45Sayb2EAw8VhdWvJ2Hyw-iYNF8nCzN21IU [image: image] https://private-user-images.githubusercontent.com/64379331/285088080-cdf6dd9d-6521-4c4b-a7a3-a8f61d43b0d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkwOTU3NjAsIm5iZiI6MTcyOTA5NTQ2MCwicGF0aCI6Ii82NDM3OTMzMS8yODUwODgwODAtY2RmNmRkOWQtNjUyMS00YzRiLWE3YTMtYThmNjFkNDNiMGQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE2VDE2MTc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIzNzE0YWZmMWZmMzlkODEwNjFlZTUzY2MzMzFkOGIwYjUxNmQyZTYwNWZiODI0MzQ3YWE3NWE5NTg1MTU1ZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.y5kTeN-sbXvnFYuFJNalspyEpYNp46H8UHN_mkuPbJQ
Hello, The error no longer appears but now the result does not appear. It just goes black and I don't know what's happening.
I've the same problem, did you solve it?
— Reply to this email directly, view it on GitHub https://github.com/pedroslopez/whatsapp-web.js/issues/510#issuecomment-2417379731, or unsubscribe https://github.com/notifications/unsubscribe-auth/APLFTQ3HPOR6V5YTDB4EZ7TZ32J63AVCNFSM6AAAAABQB4SXUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJXGM3TSNZTGE . You are receiving this because you commented.Message ID: @.***>
Si solucione, ya te mando el codigo
El mié, 16 oct 2024 a la(s) 10:46 a.m., KreK93 @.***) escribió:
[image: image] https://private-user-images.githubusercontent.com/64379331/285087960-91b1f3b4-5843-4016-a3d9-7041f9b4650d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkwOTU3NjAsIm5iZiI6MTcyOTA5NTQ2MCwicGF0aCI6Ii82NDM3OTMzMS8yODUwODc5NjAtOTFiMWYzYjQtNTg0My00MDE2LWEzZDktNzA0MWY5YjQ2NTBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE2VDE2MTc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxODFlZGIwOTZhYjY2NjdlMGNjNGJjZTU0NDY2NTk4NTkxYmUzMmU1ODVmMjdmNzdjZmZkZjJhYTY0YjlmZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IdBOH3GV45Sayb2EAw8VhdWvJ2Hyw-iYNF8nCzN21IU [image: image] https://private-user-images.githubusercontent.com/64379331/285088080-cdf6dd9d-6521-4c4b-a7a3-a8f61d43b0d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjkwOTU3NjAsIm5iZiI6MTcyOTA5NTQ2MCwicGF0aCI6Ii82NDM3OTMzMS8yODUwODgwODAtY2RmNmRkOWQtNjUyMS00YzRiLWE3YTMtYThmNjFkNDNiMGQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEwMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDE2VDE2MTc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIzNzE0YWZmMWZmMzlkODEwNjFlZTUzY2MzMzFkOGIwYjUxNmQyZTYwNWZiODI0MzQ3YWE3NWE5NTg1MTU1ZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.y5kTeN-sbXvnFYuFJNalspyEpYNp46H8UHN_mkuPbJQ
Hello, The error no longer appears but now the result does not appear. It just goes black and I don't know what's happening.
I've the same problem, did you solve it?
— Reply to this email directly, view it on GitHub https://github.com/pedroslopez/whatsapp-web.js/issues/510#issuecomment-2417379731, or unsubscribe https://github.com/notifications/unsubscribe-auth/APLFTQ3HPOR6V5YTDB4EZ7TZ32J63AVCNFSM6AAAAABQB4SXUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJXGM3TSNZTGE . You are receiving this because you commented.Message ID: @.***>
Hi sir
I will ask sir , i try run this on UBUNTU 20.04 no GUI but have error Can I run this on UBUNTU 20.04 no GUI ?
error log
root@wa-server:/whatsapp-api# npm run start
(node:15485) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! [0109/091009.834081:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
(node:15485) 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(). (rejection id: 1) (node:15485) [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. root@wa-server:/whatsapp-api# node --version v10.19.0 root@wa-server:/whatsapp-api#