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

DOMException: Failed to set the 'domain' property on 'Document': 'azure.com' is a top-level domain. #29445

Open
Magesgsm2016 opened this issue Apr 30, 2024 · 1 comment
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@Magesgsm2016
Copy link

Magesgsm2016 commented Apr 30, 2024

Current behavior

Hi
I'm trying to tests a website on an Azure domain which looks like:

cy.visit("https://smart-05.eastus.cloudapp.azure.com/ps/it/ui/smart/global/")

I'm facing this issue that above Url not launching in chrome and edge browser. Still it is working fine with electron browser.
it was worked fine earlier in all my browser. Recently chrome version is updated to 124 .post update of chrome I'm facing the below mentioned issue.
my terminal just hangs after (Tests Starting) without stopping or showing any error.
When I try to run cypress, I'm getting the following error:

Uncaught(in promise) DOMException: Failed to set the 'domain' property on 'Document': 'azure.com' is a top-level domain.
    at $Cypress.configure (https://smart-05.eastus.cloudapp.azure.com/__cypress/runner/cypress_runner.js:40723:23)
    at $Cypress.create (https://smart-05.eastus.cloudapp.azure.com/__cypress/runner/cypress_runner.js:41231:13)
    at EventManager.setup (https://smart-05.eastus.cloudapp.azure.com/__/assets/index-9bf45ce8.js:133048:52)
    at Object.executeSpec (https://smart-05.eastus.cloudapp.azure.com/__/assets/index-9bf45ce8.js:133627:27)**
Error is throwing in the  domainName
=========================
     if (domainName && config.testingType === 'e2e') {
      document.domain = domainName
    }

cypress version :13.7.3
could you please help to resolve it ?
Reference:Issue with domains in 'baseUrl' having several dots #1680

Desired behavior

No response

Test code to reproduce

when i command "npx cypress open" and click on the specific specs file

cy.configurationPage(envData.aiopsLogInUrl, envData.userName, envData.password, envData.projectName);

should be launch in cypress runner

Cypress.Commands.add("loginProjectPage", (url, username, password) => {
  cy.visit(url);
  // cy.wait(10000)
  cy.get(homePage.txtUserName).type(username);
  cy.wait(1000)
  cy.get(homePage.txtPassword).type(password);
  cy.wait(1000)
  cy.get(homePage.btnLogin).click();
  cy.get(homePage.txtProjectListing, { timeout: Cypress.config("defaultCommandTimeout") }).should("be.visible");

});

envData

export class Utility {
  getEnvData() {
    const qa = {
      userName: "adxxxxx",
      password: "23456",
      aiopsLogInUrl:
        "https://smart-05.eastus.cloudapp.azure.com/ps/it/ui/smart/global/"
}

Cypress Version

13.7.3

Node version

v18.16.1

Operating System

window 10

Debug Logs

No response

Other

No response

@HiQ-MartinMichalek
Copy link

HiQ-MartinMichalek commented May 8, 2024

Hello there,

I am facing the same issue with 'azureedge.net' since Chrome version 124.

I tried using experimentalSkipDomainInjection, but to no avail.

Chrome: V 124
Cypress: V 12.5.1
Node: v20.5.1
OS: Windows 10

@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

3 participants