Skip to content

Problems hitting requests in localhost #5895

@jmcanache

Description

@jmcanache

Current behavior:

I have a backend application running locally with xampp, this application have some API endpoints and the host of the application is http://testapi.localhost

For other side I have a html+js app runing with webpack-dev-server and runs in http://localhost:3000 , when this app load for the first time it makes a request to the API, something like "GET - http://testapi.localhost/user/1". This request is inside the javascrtip app code, is not inside in the Cypress test code.

Now this is the problem, outside Cypress the app works perfectly in any browser, the request is made succesfully but inside Cypress the request fail with the next error message: "net::ERR_EMPTY_RESPONSE"

I found some sort of "solution" but its not perfect, setting the variable HTTP_PROXY = localhost the app works inside Cypress but sometimes I receive this error in the console: "MaxListenersExceededWarning: Possible EventEmitter memory leak detected" and Cypress close.

Desired behavior:

Make a succesfully request locally that is not in the Cypress test but in the Application code

Versions

Cypress: 3.7.0
system: Windows 10
Browser: Chrome 78, Canary 80

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions