question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERR_CONNECTION_CLOSED (-100) loading 'https://app/__/#/tests/integration/home.test.js'

See original GitHub issue

Current behavior:

Cypress seems to be trying to read the test files from entirely the wrong place (the HTTPS version of the CYPRESS_BASE_URL environment variable and the tests/ directory), when I run it in a docker-compose network. As the app I’m testing doesn’t serve those files, this fails.

When I run the E2E tests normally, they pass: https://circleci.com/gh/textbook/starter-kit/443

However, when I run them in a network using docker-compose, they crash https://circleci.com/gh/textbook/starter-kit/437

The error message is:

ERR_CONNECTION_CLOSED (-100) loading 'https://app/__/#/tests/integration/home.test.js'

which suggests that Cypress is looking for the test files at the CYPRESS_BASE_URL and in the wrong directory; in that project (https://github.com/textbook/starter-kit) my integrationFolder is /e2e/integration.

It also mentions Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank" as Cypress starts - I don’t know if this is related, but it doesn’t happen in the success case.

Desired behavior:

I would like the Docker version to behave normally; I use this setup to regression test my code against multiple versions of Node.

Steps to reproduce: (app code and test code)

Test example repo: https://github.com/textbook/cypress-test-tiny/tree/recreate-base-url-issue

If you run Cypress in the container network (npm run cypress:docker), it fails with an error similar to the above complaint (and again looks in /tests, not /cypress):

ERR_CONNECTION_CLOSED (-100) loading 'https://app/__/#/tests/integration/spec.js'

If you start the app (npm start) and then run Cypress with a base URL (CYPRESS_BASE_URL=http://localhost:3000 npm run cypress:run), it seems fine, suggesting that it’s not just the setting of the URL that’s the problem.

Versions

Cypress: 3.5.0 (I noticed this because it started failing when Dependabot PRd the upgrade: textbook/starter-kit#24) OS: macOS 10.14.6 locally, also fails on CircleCI remotely

This happens with both cypress/included:3.5.0 and cypress/included:3.3.1; my first assumption was the problem was in trying to run Cypress 3.5 in the older image, but upgrading didn’t help.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
6a616ecommented, Apr 23, 2020

Wow, I had the exact same problem. This really needs to be fixed or at least a warning should be displayed. I have wasted quite some time before finding this. Thanks for sharing @Hulkmaster

1reaction
Hulkmastercommented, Feb 26, 2020

after some testing i found out that it had been broken here cypress/included:3.8.1 -> cypress/included:3.8.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix "ERR_CONNECTION_CLOSED" in Chrome (13 ...
Here are 13 troubleshooting steps that you can implement to figure out what's triggering the ERR_CONNECTION_CLOSED error. 1. Check Your Internet ...
Read more >
ERR_CONNECTION_CLOSED: What It Is and 3 Ways to Fix It
ERR_CONNECTION_CLOSED is a server-side error that occurs on Google Chrome. ... Check your internet connection by accessing other websites.
Read more >
ERR_CONNECTION_CLOSED: How to fix the connection error
Solution 1: Check internet connection and restart router if necessary. Before you delve deeply into the configuration of the system and browser ...
Read more >
angularjs - net : ERR_CONNECTION_CLOSED - Stack Overflow
This error only happens if you have no server running on the 12345 port. You are calling https://localhost:12345/dashboard/insertQuestion .
Read more >
ERR_CONNECTION_CLOSED Error Code Problem - YouTube
If you are getting ERR_CONNECTION_CLOSED Error Issue then don't worry as you just have to Check out this ERR CONNECTION CLOSED Guiding Video ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found