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

Activating HTTPS causes black screen



  • I am running Magic Mirror 2.11.0 on a Pi 4. Runs beautifully. Really impressed.

    Now, I am trying to configure it so it uses HTTPS. I have obtained the required .key and .crt files, and dropped them into a folder that MagicMirror can access.

    When I change config.js to be as follows, I get a black screen: -

    useHttps: true,
    httpsPrivateKey: "ssl/mirror.key",
    httpsCertificate: "ssl/mirror.crt",
    

    By returning useHttps to false, MagicMirroir runs perfectly again, but obviously only using HTTP.

    Any ideas why activating HTTPS causes a black screen?



  • @nzrunner

    And dropped them into a folder that MagicMirror can access

    U mean the ~/MagicMirror/ssl folder?
    Cause that is what your config said



  • Yes. I created a folder under MagicMirror called ssl for the certs



  • AFAIK this is not possible in the current release, but in the upcoming v2.12.0.

    So you

    • can wait until 1.7.2020 or
    • use the develop branch where this is already included or
    • patch the electron.js as described here


  • @karsten13 the changelog says it should work



  • @sdetweil said in Activating HTTPS causes black screen:

    @karsten13 the changelog says it should work

    I had read the Changelog as well, and noticed the following entry: -

    • Add HTTPS support and update config.js.sample

    @karsten13 I am happy to wait for the v2.12.0 release. 1st July isn’t that far away 😉



  • @nzrunner July 1, every 3 months a new release



  • @sdetweil
    Hi Sam
    just wanted to tell you that I am using devel and https works fine
    BUT
    it took me some time to understand this:
    in js/electron.js
    in line
    18
    should be
    app.commandLine.appendSwitch(“autoplay-policy”, ‘true’);
    app.commandLine.appendSwitch(“no-user-gesture-required”, ‘true’);
    app.commandLine.appendSwitch(“disable-site-isolation-trials”, ‘true’);
    app.commandLine.appendSwitch(“ignore-certificate-errors”, ‘true’);
    app.commandLine.appendSwitch(‘allow-insecure-localhost’, ‘true’);

    and ofcourse in config also add tls: true
    let me know if this turns out to be correct
    as soon as I did this it started working
    thanks
    r


Log in to reply