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

cypress adds __/ while using cy.visit() #14897

Closed
sukheja-varun opened this issue Feb 3, 2021 · 3 comments
Closed

cypress adds __/ while using cy.visit() #14897

sukheja-varun opened this issue Feb 3, 2021 · 3 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@sukheja-varun
Copy link

I am trying to use cy.visit('https://web.telegram.org'); but instead it hits https://web.telegram.org/__/

Screenshot 2021-02-04 at 12 27 09 AM

@jennifer-shehane
Copy link
Member

Can you try setting this config option in your cypress.json or elsewhere:

{
	"experimentalSourceRewriting": true
}

@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label Feb 4, 2021
@sukheja-varun
Copy link
Author

already tried that but didn't work 😞

@panzarino
Copy link
Contributor

Cypress issues a request to https://web.telegram.org/__/ in order to load Cypress from that domain. It's not actually sending a request to that domain, it's really just requesting an internal Cypress document. You can read more about why we have to do that here.

Looks like Telegram is using a service worker which is preventing Cypress from working properly (you can test by manually removing it and refreshing, which causes everything to work properly). This issue has been reported in #702, and there are a number of workarounds presented in that thread, so I'd suggest trying some of those out. (Closing this issue as duplicate)

If you're trying to automate Telegram, they do have some official APIs that might work better than Cypress for that purpose.

@panzarino panzarino added type: duplicate This issue or pull request already exists and removed stage: awaiting response Potential fix was proposed; awaiting response labels Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants