-
-
Notifications
You must be signed in to change notification settings - Fork 158
headless-chrome: The response: 'Host header is specified and is not an IP address or localhost.' #65
Comments
@juban @isholgueras any thoughts on this? |
@Michael-Brooks @rfay I'm not familiar with chromy, but perhaps you could try to install a headless chrome directly into the ddev web container using a custom Dockerfile and run your tests directly within the container ? Installation would go something like this:
|
Thanks @juban, I'll give that a go |
@Michael-Brooks In case you are struggling to install chrome in the ddev web container, you can add the following
|
Oh sorry @juban, I think you misunderstood what I was trying to say. I was trying to use https://github.com/drud/ddev-contrib/blob/master/docker-compose-services/headless-chrome/docker-compose.chrome.yaml but ran into the error as titled. I did a Google search to find that Chromy had the same issue and they used an earlier version of Chromy to fix. I then thought I would give Chromy a try with the version they used and received a blank page. The headless chrome service linked above won't allow me to use an earlier version of Chrome since I think it always uses the latest. I tried creating my own Dockerfile in web-build as suggested, but I can't seem to get it working on port 9222. If I add the below to the Dockerfile, then my ddev-router stops working.
|
I got it working #51 in the end. Thank you so much for trying to help, I really appreciate it. |
I'm using the headless-chrome service for running browser tests and the url in my app settings is set to "http://chrome:9222", but when I run my tests I get the error that's in the issue title. I've been searching around and apparently it's down to the Chrome version being used.
This issue OnetapInc/chromy#110 explains what's going on and I tried switching to the container/version they're using which stopped the error but gives me a new one.
I'm guessing it's using the correct container and port name now, but something in the service yaml file isn't set correctly which is why the response is now blank. Any help with this issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: