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.

    MMM-Lunartic

    Scheduled Pinned Locked Moved Education
    266 Posts 30 Posters 476.2k Views 29 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.
    • yawnsY Offline
      yawns Moderator
      last edited by

      Well, the main problem is that the authority which issued and signed the certificate is untrusted. Therefore browsers block access to this site showing a warning

      Mykle1M 1 Reply Last reply Reply Quote 0
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @yawns
        last edited by

        @yawns

        Thank you for that info. Please allow me to ask 2 more questions.

        1. Is that something that the owners of the API have to correct?

        2. If they can’t, or won’t, is there a way to have electron accept the untrusted certificate or disregard the warning?

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil
          last edited by

          @mykle1 they should have used a proper certificate authority.
          there is no way to do it ‘automatically’.

          As their note suggests, you will have to do it manually…
          what a pain in the rear!..

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          Mykle1M 2 Replies Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @sdetweil
            last edited by

            @sdetweil

            Ahh, what terrible news. I’m going to write back to them.

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @sdetweil
              last edited by Mykle1

              @sdetweil said in MMM-Lunartic:

              they should have used a proper certificate authority.
              there is no way to do it ‘automatically’.

              I found this in a readme of another module here on the forum. I tried to add it to my config.js (in a few places) without success. It would error the config, or not work, depending. I was hoping something like this might work for me for even though you stated there is no way to do it ‘automatically’.

              Readme quote:

              This module requires an extra step to work:

              “If you don’t already have one, add a electronOptions object with the following options in your MagicMirror config.js file.”

              and

              electronOptions: {
                  webPreferences: {
                      webSecurity: false
                  }
              }
              

              I also found this online regarding electronOptions.

              allowDisplayingInsecureContent: true,

              Is there any hope?

              EDIT

              Ok, never mind. This didn’t work

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer
                last edited by

                I have written to the US Naval Observatory again, pointing out that their use of an improper certificate authority has sidelined my Lunartic and SunRiseSet modules. I don’t hold out much hope of action on their part.

                Create a working config
                How to add modules

                Mykle1M 1 Reply Last reply Reply Quote 0
                • Mykle1M Offline
                  Mykle1 Project Sponsor Module Developer
                  last edited by

                  I’ll see what I can do with this

                  Event: ‘certificate-error’
                  Returns:

                  event Event
                  webContents WebContents
                  url String
                  error String - The error code
                  certificate Certificate
                  callback Function

                  isTrusted Boolean - Whether to consider the certificate as trusted
                  Emitted when failed to verify the certificate for url, to trust the certificate you should prevent the default behavior with event.preventDefault() and call callback(true).

                  const {app} = require('electron')
                  
                  app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
                    if (url === 'https://github.com') {
                      // Verification logic.
                      event.preventDefault()
                      callback(true)
                    } else {
                      callback(false)
                    }
                  })
                  

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer
                    last edited by

                    Well, the closest I could get with the above event handler is an error stating that I could only use the callback once and some foreboding warnings in the dev console about exposing the user to security risks. BLEH!

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • Mykle1M Offline
                      Mykle1 Project Sponsor Module Developer @Mykle1
                      last edited by Mykle1

                      @mykle1 said in MMM-Lunartic:

                      I have written to the US Naval Observatory again, pointing out that their use of an improper certificate authority has sidelined my Lunartic and SunRiseSet modules. I don’t hold out much hope of action on their part.

                      Their reply to my 2nd email:

                      **Mr. Lange:

                      I’m afraid this is a problem that goes well beyond the USNO. Over the course of the past few month ALL DoD websites have been reconfigured to “https”, resulting in certificate errors to non-DoD users. I came across this site today which has another way to correct the issue, as well as an explanation of why the problem is occurring. Evidently it’s the browser providers that seem to be on the hook to update their certificate stores.

                      https://mrmc.amedd.army.mil/index.cfm?pageid=ssl

                      Interestingly I had to manually accept the site certificate for this page, despite the fact that I’m coming in from a .mil domain!

                      https://mrmc.amedd.army.mil/index.cfm?pageid=ssl

                      Regards,

                      Geoff Chester
                      Public Affairs Officer
                      U.S. Naval Observatory
                      3450 Massachusetts Avenue, NW
                      Washington, DC 20392
                      geoff.chester@navy.mil
                      **

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 0
                      • qu1queQ Offline
                        qu1que Project Sponsor
                        last edited by qu1que

                        @Mykle1

                        Maybe this can help you.

                        Before using the MMM-Lunartic module, I used the module MMM-moonphases https://github.com/spectroman/mmm-moon-phases until one day a few months ago it also stopped working (the images of the moon did not come out ). At that time I decided to install the Lunartic, until they also stopped seeing the images of the moon a few weeks ago.

                        Then, yesterday it occurred to me to try again with the MMM-moonphases, and now the images come out. I do not know if I could give you any idea or if it can help you in something.

                        Mykle1M 1 Reply Last reply Reply Quote 1
                        • Mykle1M Offline
                          Mykle1 Project Sponsor Module Developer @qu1que
                          last edited by Mykle1

                          @qu1que said in MMM-Lunartic:

                          Maybe this can help you.

                          Thank you. I will look into that right now.

                          FYI, there is a temporary fixed uploaded to MMM-Lunartic

                          0_1545096863230_temp.png

                          EDIT

                          The site used by moon-phases suffers from the same security issue. I don’t know how your MM allows you in unless you’ve done something to circumvent the electron error. In which case, I’d like to know how you did it.

                          Create a working config
                          How to add modules

                          qu1queQ 1 Reply Last reply Reply Quote 0
                          • qu1queQ Offline
                            qu1que Project Sponsor @Mykle1
                            last edited by

                            @mykle1 Sorry for answering you so late. Apparently the moon-phases module worked correctly, or that was what I believed because the image of the moon was visible. The problem is that with time I realized that it was not updated, always showed half moon.

                            Mykle1M 1 Reply Last reply Reply Quote 0
                            • Mykle1M Offline
                              Mykle1 Project Sponsor Module Developer @qu1que
                              last edited by

                              @qu1que

                              No worries, mate. The temporary fix I uploaded is working. Hopefully, the certificate store will update and I can go back to using the US Naval Observatory API again. In the meantime, the current version of Lunartic works

                              Create a working config
                              How to add modules

                              1 Reply Last reply Reply Quote 0
                              • Mykle1M Offline
                                Mykle1 Project Sponsor Module Developer
                                last edited by

                                Download:

                                [card:mykle1/MMM-Lunartic]

                                Minor Update 1.0.5

                                Git user Mysh3ll donated a PR for correcting some French translations

                                Create a working config
                                How to add modules

                                1 Reply Last reply Reply Quote 0
                                • Mykle1M Offline
                                  Mykle1 Project Sponsor Module Developer
                                  last edited by

                                  Update

                                  I am happy to report that the certificate issue with the US Naval Observatory API has been corrected. I don’t know if I had anything to do with the fix but I did keep emailing them and the electron team about updating the certificate stores.

                                  MMM-Lunartic is now working as intended. Please do a git pull to remove the temporary fix files, or install as per the readme.

                                  I’m very happy now.

                                  Create a working config
                                  How to add modules

                                  1 Reply Last reply Reply Quote 1
                                  • Mykle1M Offline
                                    Mykle1 Project Sponsor Module Developer
                                    last edited by

                                    0_1549155040101_rotating.gif

                                    Create a working config
                                    How to add modules

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @Mykle1
                                      last edited by

                                      @mykle1 outstanding news!!!

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      Mykle1M 1 Reply Last reply Reply Quote 0
                                      • Mykle1M Offline
                                        Mykle1 Project Sponsor Module Developer @sdetweil
                                        last edited by

                                        @sdetweil

                                        Yeah, isn’t that fantastic! It affected both MMM-Lunartic and MMM-SunRiseSet so I’m very happy right now.

                                        Create a working config
                                        How to add modules

                                        1 Reply Last reply Reply Quote 1
                                        • Mykle1M Offline
                                          Mykle1 Project Sponsor Module Developer
                                          last edited by

                                          Back to normal. Now page one of my dev machine looks like this.

                                          0_1549157070367_21.png

                                          Create a working config
                                          How to add modules

                                          justjim1220J 1 Reply Last reply Reply Quote 1
                                          • justjim1220J Offline
                                            justjim1220 Module Developer @Mykle1
                                            last edited by

                                            @mykle1 Very cool layout!!!

                                            "Life's Too Short To Dance With Ugly People"
                                            Jim Hallock - 1995

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 12 / 14
                                            • First post
                                              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