Cypress: Application not working with Chrome-64. Failing to get URL "/__/#/tests/"

Created on 25 Mar 2018  Â·  32Comments  Â·  Source: cypress-io/cypress

  • Operating System: Window 7
  • Cypress Version: Cypress package version: 2.1.0
    Cypress binary version: 2.1.0
  • Browser Version: Chrome 64

Is this a Feature or Bug? Bug

Current behavior:

I am trying to test website with Chrome 64 browser. As soon as i run the test chrome browser opens up and it shows that it is requesting the page. But soon after it opens a page that says..

404. That’s an error.

The requested URL /__/ was not found on this server. That’s all we know.

Desired behavior:

Ideally it should open the login page.

How to reproduce:

It is very simple and it breaking at the start of the test.

Test code:

cy.visit('https://www.google.co.in')

Most helpful comment

I can not upload image as i am behind corporate proxy. My problem is as soon as test starts running in Chrome 64 it opens a page having __ e.g. " https://app.corp.com/__/#/tests/integration\example_spec.js" and it crashes saying 404 not found.

But when I run the same test in Electron 59 it works.

All 32 comments

I was not able to reproduce this error with the test code you have given.
Any more information you could offer would be helpful.
i.e. A screenshot? Are you behind a corporate proxy? etc.

I can not upload image as i am behind corporate proxy. My problem is as soon as test starts running in Chrome 64 it opens a page having __ e.g. " https://app.corp.com/__/#/tests/integration\example_spec.js" and it crashes saying 404 not found.

But when I run the same test in Electron 59 it works.

It really sounds like you might be experiencing a roadblock caused by your corporate proxy. A number of users are experiencing similar pains that are presenting in multiple ways and Cypress is currently looking into solutions or work arounds for these pain points.
Please take a look at this proposal #1469 and its related issues, there are some verified work arounds to try in the interim.

I want to know why it works with Electron 59 but not with Chrome 64?

I've been hitting this when the site implements framebusting techniques that cypress has no workaround for. (frame-ancestors:none)

@cameronc56 Do you have an example of a site that is not working properly in Cypress 2.1.0 due to the site's framebusting? We're unaware of any that have not been worked around already from this implementation: https://github.com/cypress-io/cypress/issues/886

Yeah we were discussing it yesterday.

https://chaseonline.chase.com/Logon.aspx?LOB=RBGLogon

I'm not sure if there is a workaround to frame-ancestors: none. But I think cypress should skip/autofail the test if it encounters this, otherwise it just hangs there.

navigating to https://chaseonline.chase.com/Logon.aspx?LOB=RBGLogon with cypress breaks cypress
I know theres the whole "dont test sites not under your control" philosophy, but this makes me think that the framebusting workaround code isn't working correctly in all cases
should I file a bug for this?

David Celis @davidcelis Mar 28 12:26
@cameronc56 I've been fighting the framebusting workaround too
Does your case involve any redirects?

Cameron Cooks @cameronc56 Mar 28 12:29
If you navigate to that url, it doesn't look like it
https://www.facebook.com/login.php
hitting this url breaks it too

David Celis @davidcelis Mar 28 12:30
OK; is your problem just that they set frame-ancestors 'none'?

Cameron Cooks @cameronc56 Mar 28 12:30
that or the CSP in the header
where do i check for frame ancestors?
is that also in the header?

David Celis @davidcelis Mar 28 12:30
yeah that's one of the CSP headers
Chase definitely sets it
I'm having the same issue with a URL on github.com, but only when making a request that involves a redirect…

Cameron Cooks @cameronc56 Mar 28 12:31
im guessing theres no workarund for that since its not javascript

David Celis @davidcelis Mar 28 12:31
I wish I could help you, but I've been fighting it since yesterday
You've already set "chromeWebSecurity": false in your config, yeah?

Cameron Cooks @cameronc56 Mar 28 12:31
but i think if cypress encounters a page with that set, it should just fail the test immediately rather than attempting to load the page and having the entire test suite hijacked
yeah

David Celis @davidcelis Mar 28 12:32
just checking. sounds like we should maybe both open an issue

Cameron Cooks @cameronc56 Mar 28 12:34
the facebook url doesn't have frame-ancestors: none set

David Celis @davidcelis Mar 28 12:36
that would surprise me; let me check
Hmmm, I don't see that particular CSP setting, but I wouldn't be surprised if something in that header was messing your request up

@cameronc56 I'm not seeing any issue with the urls attempting to framebust out of Cypress. Can you verify you are using Cypress version 2.1.0? Is this how you are navigating to the urls?

it('example', () => {
  cy.visit('https://chaseonline.chase.com/Logon.aspx?LOB=RBGLogon')
})
it('example', () => {
  cy.visit('https://www.facebook.com/login.php')
})

screen shot 2018-03-29 at 4 07 40 pm

screen shot 2018-03-29 at 4 08 55 pm

I'm on 2.1.0. I'm using --browser chrome.
yeah thats how im navigating to that site

I just noticed I'm only able to reproduce it when I have the chrome extension i'm installing downloaded.....

so I think its just my extension thats the issue.

^ this is wrong.

There was another difference between when I ran it with and without the extension.

There was some code in the comments of https://github.com/cypress-io/cypress/issues/992
to work around the framebusting that I had in my utils/index.js file that was causing it to do this.

Try it with this site: https://secure2.store.apple.com/shop/account/setup @jennifer-shehane

@cameronc56 Yeah, you shouldn't need any of the code that was previously recommended to get around framebusting applications since ^2.0.0. We automatically strip code from applications that attempt to prevent being run within an iframe, but there could definitely be some edge cases that we've missed.

This apple one is a really good usecase, and also not typical of what I've seen with framebusting behavior. It usually will show a blank grey screen, the message "Whoops, there is no test to run" is interesting. Looking into this one. 👍

@cameronc56 Opened an issue for the store.apple url here: https://github.com/cypress-io/cypress/issues/1517

With cypress 2.1.0 & chromium 64+, url visit is not redirecting properly. It adds __ in the url and the page simply waits.

Opened issue for yahoo login here: https://github.com/cypress-io/cypress/issues/1524
Stackoverflow needs some more investigation, but is definitely hijacked.

I was also experiencing this issue:
cy.visit('anysite.com') and it would redirect to cypress chrome window to anysite.com/__/test/integration/testfile.js 404

It turned out I had an extension that was redirecting traffic. Culprit was SwitchyOmega.

@khuezy Did you install SwitchyOmega specifically within the Cypress browser? Launching within the Cypress browser profile should not have brought over 3rd party extensions installed in your regular browser - exactly for this reason - to ensure they do not interfere with your testing environment. https://on.cypress.io/launching-browsers#Cypress-Profile

@jennifer-shehane yes, I installed the plugin within the Cypress browser. I was trying to proxy via socks5 to the office network from home.

With cypress 2.1.0 & chromium 64+, url visit is not redirecting properly. It adds __ in the url and the page simply waits.

Seeing this as well after login with multiple re-directs

I'm able to reproduce this issue on the example spec with cypress 2.1.0 and chromium 65 running just the default with no add-ons or mods in windows OS. I've also reproduced this with a simple cy.visit statement.

www.firemountaingems.com

Contents of framebusted js:

try {
    if( top.location.hostname != "www.optimizely.com" 
        && top.location.hostname != "g1vpenditl01" 
        && top.location.hostname != "g1vtenditl01" 
        && self.location !=  top.location) 
    {
        document.body.style.visibility = "hidden";
    }
} catch(e) {}

I thought the framebusting sanitation was supposed to take care of the self.location != top.location case, but it's definitely not working here.

@bsmithEG we have tests covering that scenario, so that shouldn't be able to framebust

any updates or alternative strategy in order to resolve this issue . since the problem is reproducing it. (being of inconsistent nature) . is there any way in which we can wait for inner window to load and then execute commands / spec file .
please refer highlighted section in below screen shot e

Hi,
I'm using Cypress 3.1.1 on MacOS Sierra. When i run a simple test(below) against chrome 70 I get The requested URL /__/ was not found on this server. That’s all we know. error.

cy.visit('https://www.google.com')

Is there a work around for this? There doesn't seems to be a cypress extension as indicated in one of the solutions? Note navigating to other google homepages e.g. https://www.google.ca or .in work fine just the .com

Unfortunately we'll have to close this issue if no reproducible example is provided. All of the examples given have not been reproducible on our side.

Can anyone provide a way to reproduce this?

@ Jennifer-shehane

I am running simple CY.visit('https://192.168.7.2')

Getting error is "err_ssl_version_or_cipher_mismatch"

Cypress version: 3.4.1 and chrome version 76

Are there any workarounds for this issue?

Hi,

Facing same issue with Chrome whereas my page works fine on Electron browser

Platform : Windows
Chrome version: 79.0.3945.88
Cypress: 3.8.0

Please open a new issue detailing exact test code with application code we can test against so that we can work towards a fix for this issue.

Was this page helpful?
0 / 5 - 0 ratings