Baileys: [BUG] creds.json broke after some reconnections.
Describe the bug Actually, i’ve been ignoring status codes diferent than 401 and reconecting the session. But after some reconnections the creds.json broke and the session is lost. But funny, when you fix the json the connection normalize again.
To Reproduce Steps to reproduce the behavior:
- Created a new connection
- Reconnect the session ignoring status codes diferent than 401
Expected behavior It was expected to maintan the session running.
Environment (please complete the following information):
- Is this on a server? in pcs and servers too
- What do your
connectOptionslook like? ´´´ { printQRInTerminal: true, auth: state, keepAliveIntervalMs: 999999, browser: Browsers.macOS(“Desktop”), syncFullHistory: false, logger: pino({ level: “fatal” }), linkPreviewImageThumbnailWidth: 852, generateHighQualityLinkPreview: true, options: { timeout: 15 * 1000, }, } ´´´ - Do you have multiple clients on the same IP? Yes
- Are you using a proxy? No
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 35 (8 by maintainers)
Commits related to this issue
- Lock file on save and read Fix #794 — committed to allburov/Baileys by allburov 2 years ago
- Lock file on save and read Fix #794 — committed to allburov/Baileys by allburov 2 years ago
- Lock file on save and read Fix #794 — committed to allburov/Baileys by allburov 2 years ago
- Lock file on save and read Fix #794 — committed to allburov/Baileys by allburov 2 years ago
- Lock file on save and read Fix #794 — committed to allburov/Baileys by allburov 2 years ago
- Lock file on save and read (#824) Fix #794 — committed to WhiskeySockets/Baileys by allburov 2 years ago
- xzx (#836) * fix(master): linting * fix(master): linting warnings * Make "logger" optional (#772) * fix: downloadMediaMessage return type matched parameter (#757) * fix: downloadMediaMess... — committed to WhiskeySockets/Baileys by purpshell 2 years ago
- Lock file on save and read (#824) Fix #794 — committed to Git-RenatoAlcantara/amarulawebsocket by allburov 2 years ago
👍🏽 Upvote! This issue deserves attention.
+1
Nice! After all, i’ve tested some ways to fix this. And you can fix the broken json by erasing all the characters after the penutimate brace. With the json fixed, you can just reconnect and all will work fine. You don’t need to read the qr_code again.
help me
Good one! this is a serious issue. I had to make adjustments in my code to fix this like: when creds.json break it will show qr so if(s.qr) Delete the current session; pull the session from the saved server; restart. This is automated but the root of the problem is not fixed
+1
+1
😯
Nice
help me🙂
Here you’re! @SheIITear have a look when you have time 🙏 https://github.com/WhiskeySockets/Baileys/pull/824
up+