Questions & Answers

Error Cypress chrome-error://chromewebdata/

I tell you my problem, I was testing the cypress tool on a page that makes purchases online, when doing a test with the following code:

let button_add_cart= "#add-to-cart-button-4";
    //let button_2= "#topcartlink > a > span.cart-label";

    cy.get('#bar-notification > div > p > a')

The second Get references another to href,this when executed, I throw the following error first

enter image description here

To solve this I should add en archivo cypress.json the property "chromeWebSecurity": false. But when added it throws me the error chrome-error://chromewebdata/

enter image description here

By also adding the property "baseUrl": "", this domain change but when changed as shown in the image, it does not pass the added articles, which breaks the test flow.

    let value= ".product-unit-price";
    let costo = "$1,800.00";


When changing path this should pass me the added items

I would appreciate the help

2023-01-23 00:25:03
can you please share what is inside your cypress.json I am interesting about "baseUrl":
2023-01-23 00:25:03
Inside the cypress.json file I only own the property "chromeWebSecurity": false
2023-01-23 00:25:03
Now add the property of "baseUrl": "" but this doesn't fix the test flow for me
2023-01-23 00:25:03
which version cypress are you using?
2023-01-23 00:25:03
and is it only one website where cypress failed, did you try any other like or?
2023-01-23 00:25:03
The cypress version is the last one which is 4.7.0 and if the error happens when you change from a domain for example to another segment that is ,that's where this chrome error comes from.The same thing happened to me when going from google and going to wikipedia and starting to interact within wikipedia such as logging etc.
Answers(2) :

Upgrading the version to 6.1.0 helped me get rid of same issue. I did following steps for updation:

  • Update cypress by either of command npm install --save-dev cypress@6.1.0 OR yarn upgrade cypress@6.1.0
  • Execute by command $node_modules/.bin/cypress open

In my case, I was getting chrome-error://chromewebdata/ because the test involved submitting a <form> into a URL that wasn't responding.

It was <form method="POST" action="https://localhost:8443/something"> but there was no server listening at localhost:8443, I forgot I was using another address.

So it was a good thing the test failed (the test was wrong), but I wish Cypress told me something like "Unable to connect to localhost:8443" instead of saying chrome-error://chromewebdata/. I would have noticed my mistake much sooner...