From 51f592015380892d87a9deffb5c1da7e21204769 Mon Sep 17 00:00:00 2001 From: Adi1231234 Date: Tue, 24 Mar 2026 15:02:46 +0200 Subject: [PATCH] fix(RemoteAuth): pass session name to store.save instead of full path (#201660) store.save() was receiving path.join(this.dataPath, this.sessionName) instead of just this.sessionName. This caused remote stores (e.g. S3) to use the full local filesystem path as the storage key, resulting in zip files being saved under paths like: sessions/Users/user/project/.wwebjs_session/default/RemoteAuth-default.zip instead of: sessions/RemoteAuth-default.zip all other store calls (sessionExists, extract, delete) already pass this.sessionName correctly. This brings store.save in line with them. the local filesystem operations (creating and cleaning up the zip file) continue to use path.join(this.dataPath, ...) which is correct. regression introduced in e6fd112. Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> --- src/authStrategies/RemoteAuth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/authStrategies/RemoteAuth.js b/src/authStrategies/RemoteAuth.js index ad3df45..7c1efdf 100644 --- a/src/authStrategies/RemoteAuth.js +++ b/src/authStrategies/RemoteAuth.js @@ -139,7 +139,7 @@ class RemoteAuth extends BaseAuthStrategy { try { compressedSessionPath = await this.compressSession(); await this.store.save({ - session: path.join(this.dataPath, this.sessionName), + session: this.sessionName, }); if (options && options.emit) this.client.emit(Events.REMOTE_SESSION_SAVED);