You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the interactive test runner from Docker container -> remote GCP VM (Ubuntu) -> mac host and get the same error, no matter what I try:
[20:0401/014738.060326:ERROR:browser_main_loop.cc(1434)] Unable to open X display.
undefined:0
illegal access
My understanding is that cypress, when running from docker, needs an X11 server to forward requests to. This server runs on my host and cypress connects to it via the DISPLAY env variable. To accept these requests, you have to add the requesting IP to xhost with xhost +$IP where IP is the machine making the request. I've done this.
Next, you need to make sure the DISPLAY env is set correctly. I have been working from a remote box (Ubuntu), so I have set the DISPLAY env to my host mac's IP with port 0: xxx.xxx.xxx.xxx:0. I have tried passing in the DISPLAY variable both via docker run and docker-compose:
I have verified that DISPLAY is being passed through to the docker image by adding echo $DISPLAY to the entrypoint command - it correctly echo's my host's IP address. No matter what I do, I always get Unable to open X display undefined:0.. I've tried multiple versions of cypress/included`, I have ensured XQuartz is set up with the correct security setting (Allow connections from network clients). At a loss here!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to get the interactive test runner from Docker container -> remote GCP VM (Ubuntu) -> mac host and get the same error, no matter what I try:
References:
My understanding is that cypress, when running from docker, needs an X11 server to forward requests to. This server runs on my host and cypress connects to it via the
DISPLAY
env variable. To accept these requests, you have to add the requesting IP toxhost
withxhost +$IP
where IP is the machine making the request. I've done this.Next, you need to make sure the DISPLAY env is set correctly. I have been working from a remote box (Ubuntu), so I have set the DISPLAY env to my host mac's IP with port 0:
xxx.xxx.xxx.xxx:0
. I have tried passing in the DISPLAY variable both via docker run and docker-compose:I have verified that DISPLAY is being passed through to the docker image by adding
echo $DISPLAY
to the entrypoint command - it correctly echo's my host's IP address. No matter what I do, I always getUnable to open X display undefined:0
.. I've tried multiple versions of
cypress/included`, I have ensured XQuartz is set up with the correct security setting (Allow connections from network clients). At a loss here!Beta Was this translation helpful? Give feedback.
All reactions