-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix remote auth #2412
base: main
Are you sure you want to change the base?
fix remote auth #2412
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested it and it seem to work fine, tested on heroku server, I forced restart the server multiple times and it then reloads the previous session instead of sending continuously new QR codes.
It don't work for me too. I can't restore the session from remote auth using mongo lib, after the whatsapp version 2.2334.12 |
@nkbhasker Why dou you think that the problem was the unzipper package? I have a server running with 34 devices under RemoteAuth, I have a issue where only ~30% of the sessions are restored after restarts. I tested your solution and my results are the same as before. I also tested locally with 2 devices and with both adm-zip and unzipper it worked the same. In my opinion there is something else causing problems with RemoteAuth. I am trying to debug it and will be happy to bring a feedback, but I would like to hear from you why you think that changing the unzip package could solve the problem! Thanks for contributing! |
I have tested the solution its working. I have tested the unzipping with unzipper. That's not properly unzipping the file. That's lead not to restore the session. |
May you give the option for unzipping as parameter in Remoteauth. |
Ye, I think the problem might be the save interval instead of unzipper |
Fix: Resolve issue by downgrading Node.js version, removing old dependencies, and reinstalling The problem was caused by using Node.js version 18, which caused compatibility issues with the project. After downgrading to Node.js version 16, removing old dependencies (old 'node_modules' directory and 'package-lock.json'), and reinstalling dependencies with 'npm install,' the issue is now resolved.
|
will this ever be merged or fixed? downgrading node is simply not a solution |
@pedroslopez can you take a look on that please? |
This fix actually worked for me. What @nkbhasker mention is possible. But I'm not really sure about the specific reason why the uncompression for unzipper doesn't work and works for adm. |
I've tested this combined with this library: https://github.com/Tots-Agency/wwebjs-google-cloud-storage and this is working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me funcionó en aws
test work |
It seems to be working now. |
Works perfectly, but... in case you will start another logged session in other server.. then it cause to messages stop sending. |
@pedroslopez will this ever be merged or fixed? |
Yay, it works perfectly with the |
This worked perfectly for me, using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with AWS S3, Mongo and another custom store and it works
adm zip loads up too much memory when i restart it was stuck at remote connected, hopefully I do not see QR code but the problem is the zipper I'm using node version 20.11.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using the solution, but hate keep the fork updated, do we have plans to merge it or what we're waiting?
Doesnt work for me. |
Could you specify what exactly, what is the error do you have? |
Working for me. |
Unfortunately, adm-zip doesn't support zip files larger than 2 gb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need this request
i tried to change the line code on the extract command with the increment "concurrency" : 10. and its work !! async unCompressSession(compressedSessionPath) {
var stream = fs.createReadStream(compressedSessionPath);
await new Promise((resolve, reject) => {
stream.pipe(unzipper.Extract({
path: this.userDataDir,
concurrency: 10
}))
.on('error', err => reject(err))
.on('finish', () => resolve());
});
await fs.promises.unlink(compressedSessionPath);
} |
PR Details
Remote auth session not getting restored.
Description
Related Issue
closes #2038, closes #1681, closes #2452
Motivation and Context
How Has This Been Tested
Types of changes
Checklist