Read the statement by Michael Teeuw here.
black screen with "node clientonly"
-
Hi everyone,
I have a fresh install of MagicMirror 2.4.1 running on a Raspberry PI 3b and am try to connect it to a MM-instance that is running in a Docker on my Synology using
node clientonly. I can access the MM2 Docker server-version at 192.0.0.95:9090 in the local network without problems from different browsers.If I start MM2 on the Raspberry Pi (locally via
npm startor remotely viaDISPLAY=:0 npm start), the local sample config.js-file runs fine with MM2 and pulls online information. I get no errors.If I execute
DISPLAY=:0 node clientonly --address 192.0.0.95 --port 9090via SSH (or the pendant locally), I getClient: Starting MagicMirror: v2.4.1 Client: Launching application. Client: libGL error: Client: MESA-LOADER: failed to retrieve device information Client: MESA-LOADER: failed to retrieve device information Client: MESA-LOADER: failed to retrieve device informationand a black screen afterwards. It would be great if anybody had an idea how to solve this.
Thanks for your help!
Config Info:
Raspberry Pi 3b
Node: v 10.10.0
NPM: v 6.4.1
Screensaver disabled
/boot/config.txt containsdtoverlay=vc4-fkms-v3d -
I think I found the solution: When starting MM inside Docker, I cannot add the true address (172.1.0.9) into the config file but leave it like this:
address: "", // LocalhostI can open this Docker-hosted Magic Mirror Website directly using a browser without problem.
I am not yet versed in JS, but I had a look at the config.js in the clientonly-folder: There is this section, where the config from the remote server is received and passed along as environment variable:
getServerAddress(); (config.address && config.port) || fail(); // Only start the client if a non-local server was provided if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].indexOf(config.address) === -1) { getServerConfig(`http://${config.address}:${config.port}/config/`) .then(function (config) { // Pass along the server config via an environment variable var env = Object.create(process.env); var options = { env: env }; config.address = config.address; config.port = config.port; env.config = JSON.stringify(config);It seems, that the
addressinformation received from the server (which is empty in my case) overwrites theconfig.addressvariable I passed along when startingnode clientonly --address 192.0.0.95 --port 9090. I changed the code manually and it worked :slightly_smiling_face:@MichMich I have added a pull request on Github to help others with the same problem (https://github.com/MichMich/MagicMirror/pull/1403)
PS: The error message describe above remains, but the Magic Mirror shows up without problem.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login