paddy-pyker / BotsApp-MD

Whatsapp Bot with multi-device support Your Personal Assistance on Whatsapp
14 stars 15 forks source link

Unable to Deploy On Heroku #2

Closed this-is-space closed 2 years ago

this-is-space commented 2 years ago

Even After Scanning the QR and All Stuff I am unable to deploy on heroku

paddy-pyker commented 2 years ago

Can you show some logs output of the error

this-is-space commented 2 years ago

2022-02-15T10:04:19.450628+00:00 heroku[botsapp.1]: Process exited with status 1 2022-02-15T10:04:19.280560+00:00 app[botsapp.1]: Error: ENOENT: no such file or directory, open '/etc/botsapp-md/auth_info_multi.json' 2022-02-15T10:04:19.280567+00:00 app[botsapp.1]: at Object.openSync (node:fs:585:3) 2022-02-15T10:04:19.280568+00:00 app[botsapp.1]: at writeFileSync (node:fs:2155:35) 2022-02-15T10:04:19.280568+00:00 app[botsapp.1]: at saveState (/BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Utils/auth-utils.js:120:9) 2022-02-15T10:04:19.280569+00:00 app[botsapp.1]: at Object.set (/BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Utils/auth-utils.js:157:21) 2022-02-15T10:04:19.280569+00:00 app[botsapp.1]: at assertingPreKeys (/BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:178:30) 2022-02-15T10:04:19.280570+00:00 app[botsapp.1]: at uploadPreKeys (/BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:185:15) 2022-02-15T10:04:19.280570+00:00 app[botsapp.1]: at WebSocket. (/BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:421:19) 2022-02-15T10:04:19.280570+00:00 app[botsapp.1]: at WebSocket.emit (node:events:520:28) 2022-02-15T10:04:19.280571+00:00 app[botsapp.1]: at WebSocket.emit (node:domain:475:12) 2022-02-15T10:04:19.280571+00:00 app[botsapp.1]: at /BotsApp-MD/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:229:35 { 2022-02-15T10:04:19.280572+00:00 app[botsapp.1]: errno: -2, 2022-02-15T10:04:19.280572+00:00 app[botsapp.1]: syscall: 'open', 2022-02-15T10:04:19.280573+00:00 app[botsapp.1]: code: 'ENOENT', 2022-02-15T10:04:19.280573+00:00 app[botsapp.1]: path: '/etc/botsapp-md/auth_info_multi.json' 2022-02-15T10:04:19.280573+00:00 app[botsapp.1]: } 2022-02-15T10:04:19.304194+00:00 app[botsapp.1]: npm notice 2022-02-15T10:04:19.304333+00:00 app[botsapp.1]: npm notice New minor version of npm available! 8.4.1 -> 8.5.0 2022-02-15T10:04:19.304635+00:00 app[botsapp.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.0 2022-02-15T10:04:19.304745+00:00 app[botsapp.1]: npm notice Run npm install -g npm@8.5.0 to update! 2022-02-15T10:04:19.305003+00:00 app[botsapp.1]: npm notice

paddy-pyker commented 2 years ago

Did you use the docker approach?

paddy-pyker commented 2 years ago

Your issue is a result of file permissions The auth_info_multi.json file cannot be created at /etc directory which is restricted in your case.

You should change the file location from '/etc/botsapp-md/auth_info_multi.json' to './auth_info_multi.json' in the main.ts file

this-is-space commented 2 years ago

As fas As I Know There is no file creation permission on Heroku

On Tue, 15 Feb 2022 at 3:46 PM, Peter Dorglo @.***> wrote:

Your issue is a result of file permissions The auth_info_multi.json file cannot be created at /etc directory which is restricted in your case.

You should change the file location from '/etc/botsapp-md/auth_info_multi.json' to './auth_info_multi.json' in the main.ts file

— Reply to this email directly, view it on GitHub https://github.com/Paddy-Pyker/BotsApp-MD/issues/2#issuecomment-1040093456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEC2CV2MAUFITRZPOFRAGLU3IRWVANCNFSM5OKV26DA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

paddy-pyker commented 2 years ago

Make the changes highlighted earlier and see if it works

paddy-pyker commented 2 years ago

Use the link below to deploy your bot botsapp-md.herokuapp.com

this-is-space commented 2 years ago

I want to host on my heroku account ...