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 connect to docker.for.mac.localhost #511
Comments
could we see the command you are using / script that you're using to run against that uri? |
Sure! I'm running my tests with browser.url(`${URL}/upload`);
// URL is passed in as an env variable--in this case pointing to
// http://docker.for.mac.localhost:8080 Also, the issue can be reproduced by using the config below, VNCing into them, and then manually navigating to the uri.
selenium-hub:
image: selenium/hub
ports:
- "4444:4444"
chrome:
image: selenium/node-chrome-debug
ports:
- "9000:5900"
links:
- selenium-hub:hub
firefox:
image: selenium/node-firefox-debug
ports:
- "9001:5900"
links:
- selenium-hub:hub You can start any kind local web server on the host (e.g. Firefox navigates to it properly, but Chrome does not |
i'm not a javascript guy, but could it be the use of the grave? in most languages,
have you tried with single/double quotes? EDIT |
That's a template literal, but the issue isn't with JS since it can't navigate there even if you VNC in and manually enter the address. Sorry if I was a little unclear— |
hrm.. ah no problem :) just trying to eliminate the obvious!
I'm under the assumption based on your issue, you meant
if this is the case, then i cannot imagine what's going wrong here. i'll be flying home tomorrow, so probably won't be able to get back to this issue in a while; hopefully @diemol can chime in here. |
Oh, I meant Chrome can't navigate there even if you VNC in there manually. However, Firefox can. Also, other tools within the Chrome container are able to such as EDIT—I just realized what you meant (and I think we're on the same page). To clarify: you CAN attempt to navigate there in VNC, but it WON'T load in Chrome. |
Sorry to jump in so late. I ran into the same issue recently, and I am asking about it here moby/moby#22753 I am assuming that it is entirely an issue related to Chrome. But we need to check if we need to adjust something in the config for Chrome, somehow I guess it is not getting this DNS entry. |
Hi @alxlu, So, it is an issue between docker and Chrome, since Chrome is not going to resolve the hostname. As a workaround, I suggest to use the IP Hopefully docker will change the name, since I'll close this issue since it is not related to docker-selenium. |
@diemol I tried |
Nevermind, I forgot that a program I'm running called Freedom messes up networking for some Docker images. |
i have the same issue, firefox works, but not chrome. |
Meta -
Image(s):
node-chrome(-debug)
Docker-Selenium Image Version(s):
latest
OS:
macOS
Expected Behavior -
Navigating to
docker.for.mac.localhost:PORT
on Google Chrome will resolve to the internal IP used by the host.Actual Behavior -
docker.for.mac.localhost refused to connect.
If I connect to the container with VNC and run wget docker.for.mac.localhost:8080, it's able to successfully resolve the IP and download the file. It also seems to be working properly on node-firefox.
The text was updated successfully, but these errors were encountered: