whatsapp-api-tutorial icon indicating copy to clipboard operation
whatsapp-api-tutorial copied to clipboard

QR tidak muncul

Open abdulaziz1999 opened this issue 2 years ago • 15 comments

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!

abdulaziz1999 avatar Sep 10 '21 11:09 abdulaziz1999

pas di cek do broser qrcodenya gk muncul

abdulaziz1999 avatar Sep 10 '21 11:09 abdulaziz1999

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.

ngekoding avatar Sep 11 '21 12:09 ngekoding

saya menemukan problem yang sama, penyelesainnya gmna @abdulaziz1999 ? saya sudah melakukan npm install dan npm update @ngekoding

harrymaulana avatar Sep 30 '21 11:09 harrymaulana

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!

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..

diazzaid avatar Oct 07 '21 13:10 diazzaid

Screen Shot 2021-11-02 at 15 55 43 saya uda npm install updet sm cek versinya mas @ngekoding , tp masi begini

destiaarti avatar Nov 02 '21 08:11 destiaarti

di local aman, pas dihosting aja begitu, apa ada yg slh kah? callbacknya ato apa nya kah? smpe qr nya ngga muncul

destiaarti avatar Nov 02 '21 08:11 destiaarti

Coba liat di console mas, biasanya ada errornya.

ngekoding avatar Nov 02 '21 09:11 ngekoding

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 ?

destiaarti avatar Nov 02 '21 10:11 destiaarti

(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

destiaarti avatar Nov 02 '21 10:11 destiaarti

itu aku dpt dr stdr_log nya bukan dr console/terminal

destiaarti avatar Nov 02 '21 10:11 destiaarti

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.

ngekoding avatar Nov 02 '21 11:11 ngekoding

hmm kalo gitu hrs nya ckup npm install/update dah cukup kan ya mas @ngekoding ? apa hrs install si lib itu kepisah npm nya?

destiaarti avatar Nov 02 '21 11:11 destiaarti

Bukan bukan, itu library dari sisi OSnya, bukan npm. Jadi installnya semacam apt-get install libnya

ngekoding avatar Nov 02 '21 13:11 ngekoding

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 avatar Jul 03 '22 13:07 aanmochtar80

@aanmochtar80 Dicoba untuk melakukan update library terlebih dulu, jalankan npm update

ngekoding avatar Jul 04 '22 03:07 ngekoding

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 ?

aldimufti12 avatar Nov 24 '22 14:11 aldimufti12