fix: sync missing changes from upstream PRs #201660 and #127083#65
Merged
Adi1231234 merged 1 commit intomain-with-fixesfrom Mar 16, 2026
Merged
fix: sync missing changes from upstream PRs #201660 and #127083#65Adi1231234 merged 1 commit intomain-with-fixesfrom
Adi1231234 merged 1 commit intomain-with-fixesfrom
Conversation
…127083 - RemoteAuth: pass session name directly to store.save instead of full path (fixes PR wwebjs#201660 - path.join was passing the full filesystem path instead of just the session identifier) - Client: register framenavigated listener before calling inject() so any page navigation that occurs during initialization is captured (fixes PR wwebjs#127083 ordering issue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Two fixes identified during a line-by-line audit of all upstream PRs against
main-with-fixes:1. RemoteAuth: pass session name to store.save instead of full path (upstream PR wwebjs#201660)
store.savewas passingpath.join(this.dataPath, this.sessionName)- a full filesystem path - instead of justthis.sessionName. All otherstore.*calls (sessionExists,extract,delete) already passthis.sessionNamedirectly, so this was an inconsistency that would cause RemoteAuth store implementations to receive the wrong value.2. Client: register framenavigated listener before calling inject() (upstream PR wwebjs#127083)
The
framenavigatedlistener was registered afterinject()was called. This creates a race: if a page navigation occurs during the initialinject(), the listener isn't set up yet and the re-injection won't happen. The fix registers the listener first, then callsinject().