karmaisgreat / simple-whatsapp-bot

Simple Whatsapp Bot - Node Js - Heroku - Baileys
23 stars 10 forks source link

[401] BaileysError #3

Closed ni3mumbaikar closed 3 years ago

ni3mumbaikar commented 3 years ago

I accidently logged out using active sessions displayed in whatsapp mobile app. Now the log tail is same no new qr code is displayed

Tried restarting dyno with heroku restart , didn't work.

how to clear that login data ?

Log tail

_2021-06-05T14:14:46.812822+00:00 app[web.1]: > simple-whatsapp-bot@0.1.0 start /app 2021-06-05T14:14:46.812822+00:00 app[web.1]: > node index.js 2021-06-05T14:14:46.812823+00:00 app[web.1]: 2021-06-05T14:14:47.835762+00:00 heroku[web.1]: State changed from starting to up 2021-06-05T14:14:48.313110+00:00 app[web.1]: 2021-06-05T14:14:48.313152+00:00 app[web.1]: Web-server running! 2021-06-05T14:14:48.313153+00:00 app[web.1]: 2021-06-05T14:14:48.365847+00:00 app[web.1]: Fetching login data... 2021-06-05T14:14:48.366049+00:00 app[web.1]: Login data found! 2021-06-05T14:14:48.367102+00:00 app[web.1]: Connecting... 2021-06-05T14:14:48.869795+00:00 app[web.1]: WARN [2021-06-05 14:14:48.863 +0000] (21): connect attempt 1 failed: BaileysError: Unexpected error in login 2021-06-05T14:14:48.869813+00:00 app[web.1]: class: "Baileys" 2021-06-05T14:14:48.869814+00:00 app[web.1]: error: { 2021-06-05T14:14:48.869815+00:00 app[web.1]: "name": "BaileysError", 2021-06-05T14:14:48.869815+00:00 app[web.1]: "status": 401, 2021-06-05T14:14:48.869815+00:00 app[web.1]: "context": { 2021-06-05T14:14:48.869816+00:00 app[web.1]: "response": { 2021-06-05T14:14:48.869816+00:00 app[web.1]: "status": 401 2021-06-05T14:14:48.869816+00:00 app[web.1]: }, 2021-06-05T14:14:48.869817+00:00 app[web.1]: "status": 401 2021-06-05T14:14:48.869817+00:00 app[web.1]: } 2021-06-05T14:14:48.869817+00:00 app[web.1]: } 2021-06-05T14:14:48.871780+00:00 app[web.1]: (node:21) UnhandledPromiseRejectionWarning: BaileysError: Unexpected error in login 2021-06-05T14:14:48.871783+00:00 app[web.1]: at WAConnection.authenticate (/app/node_modules/@adiwajshing/baileys/lib/WAConnection/1.Validation.js:97:19) 2021-06-05T14:14:48.871785+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:95:5) 2021-06-05T14:14:48.871785+00:00 app[web.1]: at async WebSocket. (/app/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:107:40) 2021-06-05T14:14:48.871786+00:00 app[web.1]: (Use node --trace-warnings ... to show where the warning was created) 2021-06-05T14:14:48.871898+00:00 app[web.1]: (node:21) 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) 2021-06-05T14:14:48.871970+00:00 app[web.1]: (node:21) [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._

karmaisgreat commented 3 years ago

Reset the PostgreSQL database from heroku dashboard

ni3mumbaikar commented 3 years ago

OK , Thanks 👍