• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

black screen with "node clientonly"

Scheduled Pinned Locked Moved Solved Troubleshooting
2 Posts 1 Posters 2.0k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    rudibarani Project Sponsor
    last edited by rudibarani Sep 12, 2018, 11:03 AM Sep 9, 2018, 10:53 PM

    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

    1 Reply Last reply Reply Quote 0
    • R Offline
      rudibarani Project Sponsor
      last edited by rudibarani Sep 12, 2018, 10:08 PM Sep 12, 2018, 10:05 PM

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

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy