MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

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 start or remotely via DISPLAY=: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 9090 via SSH (or the pendant locally), I get

    Client: 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 information
    

    and 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 contains dtoverlay=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: "", // Localhost
    

    I 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 address information received from the server (which is empty in my case) overwrites the config.address variable I passed along when starting node clientonly --address 192.0.0.95 --port 9090. I changed the code manually and it worked 🙂

    @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.