-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Warn when localhost is not mapped to 127.0.0.1 and launch Cypress directly on that ip address #1630
Comments
I just ran into this, and spent a little bit of time debugging to figure it out. A warning message would be a nice to have |
@flotwig hey see I'm not crazy it does happen. Maybe we can fix this - it should be fairly simple - but there may be a lot of hard coded We likely need to pass around a |
Logging a warning if |
It's been 4 years, I ran into a similar issue today. @jennifer-shehane @brian-mann |
What is the fix for this? Everything in my org uses This is on MacOS Ventura |
You may be running into a issue where your dev server is not responding on both IPv4 and IPv6 stacks. This is something which can be a problem with Node.js Depending on the network setup You may want to open a separate issue so that you can provide full details, including which dev server you are using. There is a recent related issue where I gave some comments |
Thanks @MikeMcC399 - not sure if this is the "best" fix but I did manage to get this working by commenting out the IPv6 localhost loopback that was in my hosts file
that line was last and previously not commented. We are running Node 18.16, maybe node found that IPv6 was available as a loopback and ignored the ipv4 binding? Not sure - it was particularly confusing as localhost worked in all browsers but maybe theres more magic in those environments to manage ipv4/6. I'll leave this here in case others run into the issue but if I am still having problems I'll make a new issue to track my particular case. |
Good to hear that you've got things working! I wouldn't worry too much about whether this is the best workaround. There isn't a one-size-fits-all solution and if your workaround is doing the job, then just stick with it! |
When users
/etc/hosts
file is nuked or has had thelocalhost -> 127.0.0.1
ip address mapping removed then Cypress will fail to spawn the browser correctly.We can detect this and provide a warning to the user, and additionally could just launch the browser on
127.0.0.1
as opposed tolocalhost
.Related to: #1455 and #680
The text was updated successfully, but these errors were encountered: