-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Uncaught DOMException: Failed to set the 'domain' property on 'Document': 'gouv.fr' is a top-level domain. #3717
Comments
I get this same error after upgrading to v3.2.0. A blank screen with the error message @magopian You can use Cypress v3.1.5 for now, as I can confirm that it works for me. |
I can recreate this with the test code above and confirm that this happens in 3.2.0 and not in 3.1.5. Stacktrace leads here: https://github.com/cypress-io/cypress/blob/issue-3739-fix-fixtures/packages/driver/src/cypress.coffee#L104
Stacktrace: cypress_runner.js:59917 Uncaught DOMException: Failed to set the 'domain' property on 'Document': 'gouv.fr' is a top-level domain.
at $Cypress.setConfig (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:59917:23)
at new $Cypress (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:59908:10)
at Function.$Cypress.create (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:60248:12)
at Object.setup (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:171065:31)
at Iframes._this._run (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:170088:32)
at Iframes.componentDidMount (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:170209:12)
at Iframes.f (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:135396:14)
at commitLifeCycles (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:157531:22)
at commitAllLifeCycles (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:158933:7)
at HTMLUnknownElement.callCallback (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140550:14)
at Object.invokeGuardedCallbackDev (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140600:16)
at invokeGuardedCallback (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140657:31)
at commitRoot (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:159145:7)
at http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:160615:5
at Object.unstable_runWithPriority (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:121479:12)
at completeRoot (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:160614:13)
cypress_runner.js:168193 Uncaught TypeError: Cannot read property 'getSizeContainer' of undefined
at App._handleScreenshots (cypress_runner.js:168193)
at App.componentDidMount (cypress_runner.js:168163)
at App.f (cypress_runner.js:135396)
at commitLifeCycles (cypress_runner.js:157531)
at commitAllLifeCycles (cypress_runner.js:158933)
at HTMLUnknownElement.callCallback (cypress_runner.js:140550)
at Object.invokeGuardedCallbackDev (cypress_runner.js:140600)
at invokeGuardedCallback (cypress_runner.js:140657)
at commitRoot (cypress_runner.js:159145)
at cypress_runner.js:160615
at Object.unstable_runWithPriority (cypress_runner.js:121479)
at completeRoot (cypress_runner.js:160614)
at performWorkOnRoot (cypress_runner.js:160543)
at performWork (cypress_runner.js:160451)
at performSyncWork (cypress_runner.js:160425)
at batchedUpdates$1 (cypress_runner.js:160640)
cypress_runner.js:157314 The above error occurred in the <Iframes> component:
in Iframes (created by App)
in div (created by App)
in div (created by App)
in App (created by Container)
in Container
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
logCapturedError @ cypress_runner.js:157314
cypress_runner.js:157314 The above error occurred in the <App> component:
in App (created by Container)
in Container
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
logCapturedError @ cypress_runner.js:157314
cypress_runner.js:160509 Uncaught DOMException: Failed to set the 'domain' property on 'Document': 'gouv.fr' is a top-level domain.
at $Cypress.setConfig (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:59917:23)
at new $Cypress (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:59908:10)
at Function.$Cypress.create (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:60248:12)
at Object.setup (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:171065:31)
at Iframes._this._run (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:170088:32)
at Iframes.componentDidMount (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:170209:12)
at Iframes.f (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:135396:14)
at commitLifeCycles (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:157531:22)
at commitAllLifeCycles (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:158933:7)
at HTMLUnknownElement.callCallback (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140550:14)
at Object.invokeGuardedCallbackDev (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140600:16)
at invokeGuardedCallback (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:140657:31)
at commitRoot (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:159145:7)
at http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:160615:5
at Object.unstable_runWithPriority (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:121479:12)
at completeRoot (http://dev.classea12.beta.gouv.fr/__cypress/runner/cypress_runner.js:160614:13) |
The issue also affects URLs with .co.uk domains: |
Also affecting Magento Commerce Cloud environments at |
Also having this issue with 'com.sg' domains:
This problem only started with 3.2.0 update and is a showstopper as nothing can be tested. |
For now you'll have to revert back to 3.1.5 if possible -- I found it works OK for my projects, does 3.1.5 work for you? |
@colinwirt Yup I reverted and it works fine, as far as this bug goes. Thanks. |
This appears to be related to an update in the I've tracked it down to be some change that happened when const parseDomain = require('parse-domain')
console.log(
parseDomain('dev.classea12.beta.gouv.fr', {
privateTlds: true,
customTlds: /^[\d\.]+$/
})
) With { tld: 'gouv.fr', domain: 'beta', subdomain: 'dev.classea12' } With { tld: 'fr', domain: 'gouv', subdomain: 'dev.classea12.beta' } Seems like something broke in |
Great, also add a unit test to make sure going forward the domain Parsing is going to stay correct
…Sent from my iPhone
On Apr 2, 2019, at 14:31, Zach Bloomquist ***@***.***> wrote:
This appears to be related to an update in the parse-domain dependency: #3437
I've tracked it down to be some change that happened when parse-domain went from 2.0.0 to 2.1.0. It seems that parse-domain has stopped correctly handling certain public suffixes.
const parseDomain = require('parse-domain')
console.log(
parseDomain('dev.classea12.beta.gouv.fr', {
privateTlds: true,
customTlds: /^[\d\.]+$/
})
)
With ***@***.***, this results in:
{ tld: 'gouv.fr', domain: 'beta', subdomain: 'dev.classea12' }
With ***@***.***, this results in:
{ tld: 'fr', domain: 'gouv', subdomain: 'dev.classea12.beta' }
Seems like something broke in parse-domain's handling of the public suffix list. I've opened an issue on their end (peerigon/parse-domain#67) and I will revert the dependency to 2.0.0 for now.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The code for this is done in cypress-io/cypress#3867, but has yet to be released. |
Released in |
Current behavior:
I'm writing my very first test:
And the test starts running, opens the url, and then freezes with a blank page. In the console I have those error messages:
Desired behavior:
It works properly if I open the local website I'm developing, or https://example.cypress.io/, but not on our development website or our production website
Steps to reproduce: (app code and test code)
To reproduce, use the following test:
Versions
Cypress: 3.2.0
Browser: Electron 59 (headless)
Operating system: Linux Mint 19.1 Tessa
The text was updated successfully, but these errors were encountered: