whatsapp-api-tutorial
whatsapp-api-tutorial copied to clipboard
QR tidak muncul
ketika dijalankan npm run start:dev
[email protected] start:dev nodemon app.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 app.js
App running on *: 8000
(node:65490) UnhandledPromiseRejectionWarning: Error: Could not find expected browser (chrome) locally. Run npm install
to download the correct Chromium revision (901912).
at ChromeLauncher.launch (/home/dqakses/App/whatsapp-api-tutorial-master/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:88:27)
at async Client.initialize (/home/dqakses/App/whatsapp-api-tutorial-master/node_modules/whatsapp-web.js/src/Client.js:74:23)
(Use node --trace-warnings ...
to show where the warning was created)
(node:65490) 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:65490) [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.
Express-file-upload: Request is not eligible for file upload!
Express-file-upload: Request is not eligible for file upload!
pas di cek do broser qrcodenya gk muncul
Pastikan sudah melakukan instalasi library yang dibutuhkan. Jika merujuk ke repository ini, silahkan jalankan npm install
.
Dan karena adanya pembaruan berkala pda library whatsapp-web.js, pastikan sudah menggunakan versi terbaru, jalankan npm update
jika diperlukan.
saya menemukan problem yang sama, penyelesainnya gmna @abdulaziz1999 ? saya sudah melakukan npm install dan npm update @ngekoding
ketika dijalankan npm run start:dev
[email protected] start:dev nodemon app.js
[nodemon] 2.0.12 [nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] startingnode app.js
App running on *: 8000 (node:65490) UnhandledPromiseRejectionWarning: Error: Could not find expected browser (chrome) locally. Runnpm install
to download the correct Chromium revision (901912). at ChromeLauncher.launch (/home/dqakses/App/whatsapp-api-tutorial-master/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:88:27) at async Client.initialize (/home/dqakses/App/whatsapp-api-tutorial-master/node_modules/whatsapp-web.js/src/Client.js:74:23) (Usenode --trace-warnings ...
to show where the warning was created) (node:65490) 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:65490) [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. Express-file-upload: Request is not eligible for file upload! Express-file-upload: Request is not eligible for file upload!
biasana setelah di update socket.io nya berubah sedangkan di kodingan index.html menggunakan versi 2.3.0. jadi pastikan socket.io pada index.html dan module yang terinstall versinya sama..
saya uda npm install updet sm cek versinya mas @ngekoding , tp masi begini
di local aman, pas dihosting aja begitu, apa ada yg slh kah? callbacknya ato apa nya kah? smpe qr nya ngga muncul
Coba liat di console mas, biasanya ada errornya.
console nya ngga ada error sm skli mas. Dan aku gatau knp ya mas @ngekoding itu kan aku taruh subdomain. hbs ngerun itu domain utamanya mlh down jd 503 gitu. Kayanya ngga ggara portnya , karena yg satu dy php gitu mas, sedangkan ini node js beda port biasanya. kenapa ya mas @ngekoding ?
(node:2073584) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/edukasis/nodevenv/wa1.edukasisahamsyariah.id/10/lib/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/home/xx/nodevenv/xx/10/lib/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.helper_js_1.helper.addEventListener (/home/xx/nodevenv/xx/10/lib/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (events.js:203:15)
at Interface.close (readline.js:397:8)
at Socket.onend (readline.js:173:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:2073584) 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:2073584) [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.
oh ya sblmnya ada begituan mas, cmn di console nya ngga error
itu aku dpt dr stdr_log nya bukan dr console/terminal
Jadi kan ini pakai library whatsapp-web.js yang notabene memerlukan Puppeteer, nah Puppeteer itu sendiri butuh lib tertentu untuk bisa jalan.
Kasus ini biasanya saya temui di OS Linux, contohnya dari pesan error di atas mengatakan bahwa dia gak bisa menemuka lib libatk-bridge-2.0.so.0, jadi harus diinstall dulu.
hmm kalo gitu hrs nya ckup npm install/update dah cukup kan ya mas @ngekoding ? apa hrs install si lib itu kepisah npm nya?
Bukan bukan, itu library dari sisi OSnya, bukan npm. Jadi installnya semacam apt-get install libnya
maaf min saya juga sampai sekarang masih mengalami hal yang sama cuman sampai disini saja
`root@whatsapp:~/whatsapp# npm run start:dev
[email protected] start:dev nodemon app.js
[nodemon] 1.19.4
[nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node app.js
App running on *: 8000
`
mohon pencerahannya min
@aanmochtar80 Dicoba untuk melakukan update library terlebih dulu, jalankan npm update
C:\laragon\www\wa_gateway>npm install npm WARN [email protected] No repository field.
audited 263 packages in 5.691s
20 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
QR gk muncul? apakah dari npm install ada yg salah ?