Skip to content

Code injection requires manual page refresh to work properly in Puppeteer #1

Description

@Mrxpj

Detailed Description
I'm experiencing an issue when using the code injection functionality from the demo. When launching a browser through Puppeteer and navigating to the target page, the injected code fails to take effect immediately and cannot intercept the required parameters. The interception only works after manually refreshing the page once.
Steps to Reproduce
Launch browser using Puppeteer
Inject the demo code using evaluateOnNewDocument
Navigate to the target page
Expected Result: Injected code should immediately intercept target parameters
Actual Result: Parameters are not intercepted, page behavior is abnormal
Manually refresh the page (F5 or Ctrl+R)
After refresh, the injected code starts working correctly and successfully intercepts parameters

20250701_112404.mp4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions