CypressError: `cy.visit()` failed trying to load: https://dev-eccc.env.xxxx.com/ via Gitlab CI job

Viewed 2740

I have setup a Gitlab ci/cd job to execute all cypress integration tests. I found that all tests are getting fail due to home URL is getting failed to load by cy.visit(). On my local machine it is working fine. below is the complete Error trace:

 CypressError: `cy.visit()` failed trying to load:
        https://dev-eccc.env.ihsmarkit.com/
        We attempted to make an http request to this URL but the request failed without a response.
 We received this error at the network level:
> Error: getaddrinfo ENOTFOUND dev-eccc.env.ihsmarkit.com
Common situations why this would fail:
- you don't have internet access
- you forgot to run / boot your web server
- your web server isn't accessible
- you have weird network configuration settings on your computer
  Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Facility Register`
   at http://localhost:45271/__cypress/runner/cypress_runner.js:156433:23
   at visitFailedByErr (http://localhost:45271/__cypress/runner/cypress_runner.js:155794:12)
   at http://localhost:45271/__cypress/runner/cypress_runner.js:156432:11
   at tryCatcher (http://localhost:45271/__cypress/runner/cypress_runner.js:10130:23)
   at Promise._settlePromiseFromHandler (http://localhost:45271/__cypress/runner/cypress_runner.js:8065:31)
   at Promise._settlePromise (http://localhost:45271/__cypress/runner/cypress_runner.js:8122:18)
   at Promise._settlePromise0 (http://localhost:45271/__cypress/runner/cypress_runner.js:8167:10)
   at Promise._settlePromises (http://localhost:45271/__cypress/runner/cypress_runner.js:8243:18)
   at _drainQueueStep (http://localhost:45271/__cypress/runner/cypress_runner.js:4837:12)
   at _drainQueue (http://localhost:45271/__cypress/runner/cypress_runner.js:4830:9)
   at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues 
   (http://localhost:45271/__cypress/runner/cypress_runner.js:4846:5)
   at Async.drainQueues (http://localhost:45271/__cypress/runner/cypress_runner.js:4716:14)
   From Your Spec Code:
   at Object.homepage_test (http://localhost:45271/__cypress/tests?p=cypress/integration/eccc- 
   app-ui-cypress/API/register_api.ts:71:8)
   at Context.eval (http://localhost:45271/__cypress/tests?p=cypress/integration/eccc-app-ui- 
   cypress/API/register_api.ts:13:25)

    From Node.js Internals:
    Error: getaddrinfo ENOTFOUND dev-eccc.env.ihsmarkit.com
     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)
0 Answers
Related