Open Mallets opened 3 years ago
Pushed a fix to this. Let me know if you still have the problem.
I succesfully managed to build it on Mac OS X. However, it fails to run:
$ docker run zenoh-web-browser
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aborted
I'm running XQuartz as X server on Mac OS X. Am I missing something?
You need to set the DISPLAY
environment variable in the container by using -e
option.
In Ubuntu/Debian, it is enough to pass it like -e DISPLAY=$DISPLAY
.
However, it seems that for Mac OS X and XQuartz you need to do additional steps (untested since I do not own a Mac OS X machine):
Then, run the container by:
# allow access from localhost
xhost + 127.0.0.1
# run zenoh-browser with X11 forwarding and keep running until it quits
docker run -e DISPLAY=host.docker.internal:0 zenoh-browser:latest
Thanks for the step by step instructions. Unfortunately I stumbled upon another issue:
$ docker run -e DISPLAY=host.docker.internal:0 zenoh-web-browser:latest
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user-docker'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Please register the custom scheme 'zenoh' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
QGLXContext: Failed to create dummy context
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
I've also followed this and the libGL errors went away. Now, I'm left with the following error:
$ docker run -e DISPLAY=host.docker.internal:0 -e LIBGL_ALWAYS_INDIRECT=1 zenoh-web-browser:latest
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user-docker'
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Please register the custom scheme 'zenoh' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
QGLXContext: Failed to create dummy context
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Aborted
I am trying to get a Mac OS X, so that I can properly debug the problem. I will come back to you as soon as possible
When I try to build zenoh-web-browser on Mac OS X I get the following error: