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

Domain relaxation is buggy #493

Closed
tuberlinsap opened this issue May 8, 2017 · 8 comments
Closed

Domain relaxation is buggy #493

tuberlinsap opened this issue May 8, 2017 · 8 comments
Milestone

Comments

@tuberlinsap
Copy link

tuberlinsap commented May 8, 2017

  • Operating System: Linux
  • Cypress Version: Cypress CLI: 0.13.1

Are you requesting a feature or reporting a bug?

Bug

Current behavior:

When trying to run a test, I get the following error upon trying to "visit" the page.

cy
      .visit(DOMAIN);
/* ... */
SecurityError: Failed to set the 'domain' property on 'Document': 'de' is a top-level domain.

Expected behavior:

It should not try to "relax" to a top-level Domain.

How to reproduce the current behavior:

Unfortunately we're trying to use cypress as a test tool in an intranet environment which I can not open access to. It seems to be an error with the relaxing of the domain, where the domain is not split up correctly or something like that. If you need further info, let me know.

@brian-mann
Copy link
Member

brian-mann commented May 8, 2017

I believe this is the same problem as #380.

When there are 5 subsets in the domain Cypress fails to properly parse the superdomain. Switching to use the publicsuffix will fix this in #402.

@tuberlinsap
Copy link
Author

Can you give me some kind of estimate of when this is going to be implemented?

@brian-mann brian-mann added this to the 1.4.2 milestone Feb 4, 2018
brian-mann added a commit that referenced this issue Feb 4, 2018
…ixes #1161

- use the public suffix when parsing tld’s so that document.domain is
set correctly
brian-mann added a commit that referenced this issue Feb 4, 2018
* server: fixes #802 and fixes #380 and fixes #402 and fixes #493 and fixes #1161

- use the public suffix when parsing tld’s so that document.domain is
set correctly

* driver: move location spec back into cypress tests

* server, driver: fixes: #600 and fixes #1175 use public suffix for parsing tld, handle multiple different subdomains on cy.visit
@brian-mann
Copy link
Member

brian-mann commented Feb 5, 2018

Released in 1.4.2.

@nrutman
Copy link

nrutman commented Feb 5, 2018

I was not having this problem until I upgraded to 1.4.2 (see attached screenshot). Now I get a blank screen and this error in the console.

cypress

NOTE that I'm using this on a private dev sandbox (not a publicly accessible site).

@brian-mann
Copy link
Member

@nrutman Can you provide your test code and your /etc/hosts file?

I believe the local part is messing up the URL because there is a special override specifically for those.

@nrutman
Copy link

nrutman commented Feb 6, 2018

@brian-mann we are using custom DNS rules to route these domains (and nothing references jazzhrd.local). If you give me an email, I can send you more info about the DNS configuration privately—but it doesn't look like there are any smoking guns there.

Regarding my code, this happens as soon as my test opens. My first call is cy.visit('/');.

Let me know how you want to proceed. Thanks!

@chielos24
Copy link

Having the same issues here : #1278
1.4.1 is working fine.

@brian-mann
Copy link
Member

@nrutman opened new issue here: #1292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants