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-AssistantMk2 and auth_and_test.js

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    7 Posts 2 Posters 2.3k 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.
    • S Offline
      sonicgoose
      last edited by

      Reposting because I put this in the wrong forum the first time.

      I’ll try to make a long story short:

      Installed MMM-AssistantMk2 and MMM-Hotword. Added default config for both to config.js. Got nothing but a black screen. Narrowed the problem down to MMM-AssistantMk2 and grpc. So went through the troubleshooting tips to switch to grpc-js instead (same problem) and to downgrade to v1.13 of grpc. I’ve now (for the third time) created my credentials.json file and am trying to run

      node auth_and_test.js
      

      This is what shows up after a few seconds:

      /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/google-assistant/components/auth.js:27
        const oauthClient = new OAuth2(key.client_id, key.client_secret, key.redirect_uris[0]);
                                           ^
      
      TypeError: Cannot read property 'client_id' of undefined
          at new Auth (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/google-assistant/components/auth.js:27:38)
          at new GoogleAssistant (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/google-assistant/index.js:21:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AssistantMk2/auth_and_test.js:60:19)
          at Module._compile (internal/modules/cjs/loader.js:654:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
          at Module.load (internal/modules/cjs/loader.js:566:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
          at Function.Module._load (internal/modules/cjs/loader.js:498:3)
          at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
          at startup (internal/bootstrap/node.js:201:19)
      

      And I’m stuck. Help?

      ? 1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User @sonicgoose
        last edited by

        @sonicgoose
        Your credentials.json is wrong. Especially you’ve missed or failed something on making credentials on google console

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sonicgoose @Guest
          last edited by

          @Sean I don’t think so. I got it to work twice. My browser launched, I logged in, I got a code back and paste that into the prompt presented by auth_and_test.js. Twice. Now the third time, after downgrading grpc to v1.13, it won’t work and I get the above error.

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @sonicgoose
            last edited by

            @sonicgoose
            Weird, because it is not related grpc. error log says your credentials.json has been corrupted or missing something.

            Open your credentials.json and look into it.

            {"installed":{"client_id":"377258677000-2rv97u3b2....
            

            It should seems similar with above.
            Your file might have other text instead "installed". Isn’t it?

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sonicgoose @Guest
              last edited by

              @sean My file starts with

              {"web":{"client_id":"10236352...
              
              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sonicgoose @sonicgoose
                last edited by

                @Sean This is weird. I just downloaded my credentials again and this time got

                {"installed":{"client_id":"1023635200...
                

                I’ll try this again when I get home. No idea how it could have changed.

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

                  SUCCESS!!

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