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

cannot use http://app as a baseurl #262

Closed
Hulkmaster opened this issue Feb 26, 2020 · 11 comments
Closed

cannot use http://app as a baseurl #262

Hulkmaster opened this issue Feb 26, 2020 · 11 comments
Assignees

Comments

@Hulkmaster
Copy link

Hulkmaster commented Feb 26, 2020

So i'm using cypress/included image, and recently i tried to upgrade and started to have an issue

ERR_CONNECTION_CLOSED (-100) loading 'https://app/__/#/tests/integration/all-page-visit.spec.js'
Error: ERR_CONNECTION_CLOSED (-100) loading 'https://app/__/#/tests/integration/all-page-visit.spec.js'
    at rejectAndCleanup (electron/js2c/browser_init.js:5881:21)
    at WebContents.failListener (electron/js2c/browser_init.js:5891:11)
    at WebContents.emit (events.js:203:13)

that issue started to happen after upgrading
from cypress/included:3.8.1
to cypress/included:3.8.2

also might be related cypress-io/cypress#5482 (there you can also find repro)

thats my config

  cypress:
    image: "cypress/included:3.8.2"
    depends_on:
      - app
    environment:
      - CYPRESS_BASE_URL=http://app
    working_dir: /e2e
    volumes:
      - ./e2e:/e2e

so on cypress/included:3.8.1 works fine
starting cypress/included:3.8.2 have an error (also on 4.0.2)

UPD:
new test repo https://github.com/Hulkmaster/cypress-app-test

works on 3.8.1
works on 3.8.2
doesn't work on 4.5.0

@bahmutov
Copy link
Contributor

Not sure why it would be the case, can you try renaming the container from app to something else?

@Hulkmaster
Copy link
Author

nope

project is pretty old and big, and there is a lot of hardcoded hostnames, and right now we are trying to implement e2e testing

should it not be easy to just provide in cypress option like CYPRESS_ENGINE_URL or something?

also its clear that problem happened from 3.8.1 to 3.8.2, should it be easy to track it?

@Alaatohamy
Copy link

Alaatohamy commented Mar 8, 2020

Did you try to add the port of your app like this

app:
    // your config
    ports:
      - 3000:3000
cypress:
    environment:
      - CYPRESS_BASE_URL=http://app:3000

@Hulkmaster
Copy link
Author

my app must work on 80 port, because its the entrypoint of the whole app

@jennifer-shehane

This comment has been minimized.

@Hulkmaster
Copy link
Author

As I stated in description it started to happen in 3.8.2
According to screenshot you have 3.8.0 version

@jennifer-shehane
Copy link
Member

@Hulkmaster
Copy link
Author

give me a hour - i'll create another repro repo

@Hulkmaster
Copy link
Author

https://github.com/Hulkmaster/cypress-app-test

the strange part is
works on 3.8.1
works on 3.8.2

doesn't work on 4.5.0
(had not tested other versions)

@jennifer-shehane
Copy link
Member

Yeah, I can recreate the issue as provided from this repo running docker-compose up. Changing the value of the baseUrl to another value makes it run.

// fails with connection error (abnormal behavior)
CYPRESS_baseUrl=http://app  

// fails because it can't connect to server (normal behavior)
CYPRESS_baseUrl=http://foo

// passes, visits the site
CYPRESS_baseUrl=https://example.cypress.io

Screen Shot 2020-05-12 at 8 41 36 PM

Full docker-app.log

@mjhenkes
Copy link
Member

I updated the reproduction to 12.3.0. Works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants