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

enable https / public certificates example - black screen

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 589 Views 2 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.
  • B Offline
    br4tt3
    last edited by Jun 17, 2021, 10:54 AM

    Hi all,

    Kind of new so forgive me if i’ve missed the “answer” if existing already. I’ve google it a couple of time - found references for it but nothing works out so far. My scenario is:
    MM running on a Pi4, I’ve got MM Remote Control running of it, and the config is running smoothly except that I want to have https enabled. That being said - what I’ve done:

    1. I moved the .pem files (private and fullchain) over to a local folder on the Pi.

    2. went into config.js and changed / added the following entries:

      useHttps: true,
      httpsPrivateKey: “/home/pi/MagicMirror/config/https/privkey.pem”,
      httpsCertificate: “/home/pi/MagicMirror/config/https/fullchain.pem”,

    3. Restart. From that point on: I can access the slideshow / configuraiton over
      https://myfakedomain.org:8080 - certificate is validated, is accessible, all good. I can also see configuration coming up when accessing it through the MM RemoteControl module integration. However…

    4. The physical display connected to the PI is pitch black, when trying to out the configuration and does not display what is shown over: https://myfakedomain.org:8080. As soon as i turn of useHttps: true to false, reboot - working again - except the https integration - both on the physical display or the web browser.

    Do I have to make additional changes, except the config.js file, to support https configurations? Also tried to find an existing template, example - where some one is using https/ssl but to no success so far.

    Thanks in advance!

    S 1 Reply Last reply Jun 17, 2021, 11:23 AM Reply Quote 0
    • S Online
      sdetweil @br4tt3
      last edited by sdetweil Jun 17, 2021, 11:26 AM Jun 17, 2021, 11:23 AM

      @br4tt3 typically when using https, you would use port 443

      if you open the developers window, ctrl-shift-i on the keyboard, and select the console tab, do you see any errors? usually in red text

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      B 1 Reply Last reply Jun 17, 2021, 9:10 PM Reply Quote 0
      • B Offline
        br4tt3 @sdetweil
        last edited by br4tt3 Jun 17, 2021, 9:20 PM Jun 17, 2021, 9:10 PM

        @sdetweil - hey and thanks for reply! I checked the dev console: basically found this clue message:

        " Policy set or a policy with “unsafe-eval” enabled. This exposes users of
        this app to unnecessary security risks."

        Google it, found another entry where u participated: https://github.com/MichMich/MagicMirror/issues/2147

        I proceeded with adding row:
        meta http-equiv=“Content-Security-Policy” content=“script-src ‘self’;”
        to index.html, rebooted - same stuff…

        then came to think of that I had a reference inside of the config.js file which was pointing to a 192.168.x.x address… sorted that part out, so it works just fine over the certificate (over a browser from my main PC) - however, same stuff on the physical display, pitch black and still displaying the above listed “console clue”…

        Thanks again Sam!

        1 Reply Last reply Reply Quote 0
        • B Offline
          br4tt3
          last edited by Jun 18, 2021, 7:45 AM

          Looked at the console of the dev window, detailed message being:

          Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy or a policy with “unsafe-eval” enabled. This exposes users of this app to unnecessary security risks.

          For more information and help. Consult https://electronjs.org/docs/tutorial/security
          This warning will not show up once the app is packaged.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            4/4
            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