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-MirrorMirrorOnTheWall installation issue

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    138 Posts 11 Posters 150.5k Views 10 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.
    • O Offline
      OceanK
      last edited by

      and here is some error in the logs when I try other stuff:

      2018-09-01T15:41:09.907Z 722f8cd3-adfd-11e8-befe-f5fd64df2d92
      {
      “errorMessage”: “In state: . No handler function was defined for event SessionEndedRequest and no ‘Unhandled’ function was defined.”,
      “errorType”: “Error”,
      “stackTrace”: [
      “AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:212:15)”,
      “AlexaRequestEmitter.ValidateRequest (/var/task/node_modules/alexa-sdk/lib/alexa.js:181:23)”,
      “HandleLambdaEvent.i18n.use.init (/var/task/node_modules/alexa-sdk/lib/alexa.js:123:29)”,
      “/var/task/node_modules/i18next/dist/commonjs/i18next.js:190:9”,
      “done (/var/task/node_modules/i18next/dist/commonjs/i18next.js:281:21)”,
      “/var/task/node_modules/i18next/dist/commonjs/i18next.js:302:7”,
      “I18n.loadResources (/var/task/node_modules/i18next/dist/commonjs/i18next.js:238:7)”,
      “I18n.changeLanguage (/var/task/node_modules/i18next/dist/commonjs/i18next.js:301:10)”,
      “load (/var/task/node_modules/i18next/dist/commonjs/i18next.js:186:14)”,
      “I18n.init (/var/task/node_modules/i18next/dist/commonjs/i18next.js:195:7)”
      ]

      1 Reply Last reply Reply Quote 0
      • richland007R Offline
        richland007
        last edited by

        Where do you find these log files at?? so i can look at mine??
        it seems like it doesn’t find the way to sent the results back and where to send them??

        1 Reply Last reply Reply Quote 0
        • O Offline
          OceanK
          last edited by

          Login to your console where u created the lamda, search for CloudWatch and then Logs, console.aws.amazon.com

          1 Reply Last reply Reply Quote 0
          • O Offline
            OceanK
            last edited by

            Whats the progress and status on this?@richland007

            1 Reply Last reply Reply Quote 0
            • richland007R Offline
              richland007
              last edited by

              @OceanK Absolutely nothing i have to do much more research and read everything on the forums when it comes to this.
              It seems like it has a problem with: No handler function was defined for event AMAZON.FallbackIntent and no ‘Unhandled’ function was defined.

              Here is my error log as well and it is exactly like yours

              0_1536003807221_MyLamdaError.png

              We need to continue reading
              Denis

              1 Reply Last reply Reply Quote 0
              • O Offline
                OceanK
                last edited by

                Have you seen that the code makers repo has changed 2 files like 2 month ago? Though it didn’t make any difference still stuck at the same place as you. I think it’s something with the iot part and lamda function.

                Let’s keep going ;)

                1 Reply Last reply Reply Quote 0
                • richland007R Offline
                  richland007
                  last edited by

                  @OceanK Well now i get no errors in Lamda but i dont think its working still this is what i did after a lot of reading in the internet and in the MM forums.
                  Step 1. Delete your archive.zip you have on your Rpi
                  2. Go to “MirrorMirrorOnTheWallSkill” open “src” folder and open to edit “index.js”
                  3. At the very end of that file right before the very last } bracket
                  enter the following:

                  ,
                      'Unhandled': function () {
                          this.emit(':ask', 'Sorry I didnt understand that. Say help for assistance.');
                      }
                  

                  notice the “,” right after the prior to last } before 'Unhandled" … so it wont give you a syntax error.
                  4. Go all the way up almost at the beginning of the file “index.js” and replace the following:

                  const appId = "amzn1.ask.skill.XXXXXXXXXXX-XXXXX-9b1c-3d309a950fcf";
                  
                  const MirrorMirror = require('./MirrorMirror');
                  MirrorMirror.setup();
                  
                  const Keys = require("./certs/keys.json");
                  const GoogleImages = require('google-images');
                  var googleImages = new GoogleImages(Keys.cse.ID, Keys.cse.API_key);
                  
                  const YouTube = require('youtube-node');
                  var youTube = new YouTube();
                  youTube.setKey(Keys.youtube.API_key);
                  
                  exports.handler = function(event, context, callback) {
                      let alexa = Alexa.handler(event, context);
                      alexa.appId = appId;
                  

                  Make sure to change your appId with your own

                  You will see no more errors on Lamda and if you ask after on the wall it will say i am sorry i dont understand and if you ask for help it will tell you what help it can provide but nothing more than that… yet.

                  To be continued
                  Denis

                  O 1 Reply Last reply Reply Quote 0
                  • richland007R Offline
                    richland007
                    last edited by

                    Oh after that step 5 zip it back again and upload it to Lamda and save it
                    you should see no more errors

                    Denis

                    1 Reply Last reply Reply Quote 0
                    • O Offline
                      OceanK
                      last edited by OceanK

                      Ok cook I will try it. Just one more question. When you zip the files for the first time. Did you hardcode the MirrorMirror.js with the cert paths as well?

                      And then again hardcoded the cert path for the MMM-MirrorMirrorOnTheWall

                      Am I understanding it right?

                      1 Reply Last reply Reply Quote 0
                      • O Offline
                        OceanK @richland007
                        last edited by

                        @richland007 So need more info here about this: At the very end of that file right before the very last } bracket
                        enter the following:
                        ,
                        ‘Unhandled’: function () {
                        this.emit(‘:ask’, ‘Sorry I didnt understand that. Say help for assistance.’);
                        }
                        notice the “,” right after the prior to last } before 'Unhandled" … so it wont give you a syntax error.

                        So if I copy the last part from the index.js it should look like this with that extra ?

                        // Send publish attempt to AWS IoT
                        MirrorMirror.showVideo(result.items[0].id.videoId, searchTerm, alexaEmit);
                        }
                        });
                        } else {
                        this.emit(‘:askWithCard’, this.t(“SHOW_VIDEO_ERR”), this.t(“SHOW_VIDEO_ERR”), this.t(“ERROR_CARD”), this.t(“SHOW_VIDEO_ERR”))
                        }
                        }
                        ,
                        ‘Unhandled’: function () {
                        this.emit(‘:ask’, ‘Sorry I didnt understand that. Say help for assistance.’);
                        }
                        };

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 13
                        • 14
                        • 2 / 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