Skip to content
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

User agent in Electron isn't fully overridden when providing the experimentalModifyObstructiveThirdPartyCode option #23597

Closed
AtofStryker opened this issue Aug 29, 2022 · 2 comments · Fixed by #23721
Labels
topic: cy.origin Problems or enhancements related to cy.origin command

Comments

@AtofStryker
Copy link
Contributor

Current behavior

Inside Electron, it looks like some requests, in particular document requests, have the incorrect UA associated with the request.

Desired behavior

Cypress should override the user agent as expected in #22958 in all cases when Electron is run with experimentalModifyObstructiveThirdPartyCode option set to true

Test code to reproduce

Adding the following code after this line seems to resolve the issue, via setting the UA optimistically via CDP:

 webContents.debugger.sendCommand('Network.setUserAgentOverride', {
   userAgent,
 })

Cypress Version

10.6.0

Node version

v16.15.0

Operating System

macOS 12.4 (Monterey)

Debug Logs

Not Needed in this case as code is reproducible

Other

This doesn't seem to have an impact on Google login, which means the behavior may have changed

@AtofStryker AtofStryker added the topic: cy.origin Problems or enhancements related to cy.origin command label Aug 29, 2022
@AtofStryker AtofStryker self-assigned this Aug 29, 2022
@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Sep 8, 2022
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Sep 9, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 9, 2022

The code for this is done in cypress-io/cypress#23721, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 13, 2022

Released in 10.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.8.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 13, 2022
@AtofStryker AtofStryker removed their assignment Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cy.origin Problems or enhancements related to cy.origin command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants