joanaz / MirrorMirrorOnTheWallSkill

Alexa skill for controlling a MagicMirror²
MIT License
44 stars 35 forks source link

the service simulator ERROR #7

Closed NoBreakz closed 5 years ago

NoBreakz commented 7 years ago

The remote endpoint could not be called, or the response it returned was invalid.

i get this when i try to test Alexa.

this is the code

{ "session": { "sessionId": "SessionId.349c8ff7-d044-4327-97f0-f1dbae655496", "application": { "applicationId": "ive deleted this part bcuz of obvious resons ;)" }, "attributes": {}, "user": { "userId": "amzn1.ask.account.AFFWRS2SSA34VR6DTGNQJBEAMW6PSE6EQZ3JBP6LUEW6A4A6EOCBDEQZPVXS5ISLKXOOKBDKXVBILHALC5YS34XIOOGBSVO4ONFUYGLG3VNNIKU4HOSLXVSGSNHGOYV2U4GTJCO5JPDIAH3SNCCJ7UWFGMUCED46K2UY6U4NCX7GF2EMQKPJG2I4AJG4MI2ECWJ3FYJQJGMGAEY" }, "new": true }, "request": { "type": "LaunchRequest", "requestId": "EdwRequestId.93086214-9709-4cd4-841d-e94455304601", "locale": "en-US", "timestamp": "2017-03-03T20:18:11Z" }, "version": "1.0" }

snbe82 commented 7 years ago

I get the same same exact error

D3rpi commented 7 years ago

Step 2.1 Check that you renamed the keys_sample.json to keys.json. I had that issue too when I was setting mine up. Yours might be caused by something else but it is worth checking.

AnonDEmaYan commented 7 years ago

I've gone through all the steps mentioned in the readme file clearly. I'm stuck with the same error as mentioned above. It would be helpful if the owner of the code @joanaz responds to this query as most of us are stuck with the same issue. TIA! image

Edit 1: I've figured out a solution for this error. Go to Actions -> Configure test event -> In the sample event template column, go ahead and select "Alexa start Session". It will work this time.

joematoe commented 7 years ago

I had this error too. Make sure when you are creating your role in step 3.8 that a policy template is defined - this isn't shown in the tutorial/screenshot. I clicked on "create a custom role" and it took me to a new page where the role was called "lambda_basic_execution". After saving it, it returns you to the configuration page which looks like the below screenshot.

image

cd360 commented 7 years ago

Feel like I've followed the guide to a T, but getting the following error in the Lambda Management screen:

{ "errorMessage": "Invalid \"certPath\" option supplied.", "errorType": "Error", "stackTrace": [ "new DeviceClient (/var/task/node_modules/aws-iot-device-sdk/device/index.js:391:7)", "Object.DeviceClient [as device] (/var/task/node_modules/aws-iot-device-sdk/device/index.js:171:14)", "Object.app.setup (/var/task/MirrorMirror.js:11:23)", "Object. (/var/task/index.js:21:14)", "Module._compile (module.js:570:32)", "Object.Module._extensions..js (module.js:579:10)", "Module.load (module.js:487:32)", "tryModuleLoad (module.js:446:12)", "Function.Module._load (module.js:438:3)" ] }

Any help/advice appreciated.

keys.json is correct. Contents of src folder zipped and uploaded (done via S3)

cd360 commented 7 years ago

sorted the initial certPath problem, but now getting the following instead:

16:53:00 Syntax error in module 'index': SyntaxError at Object.parse (native) at Object.Module._extensions..json (module.js:587:27) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/var/task/index.js:23:14) at M Syntax error in module 'index': SyntaxError at Object.parse (native) at Object.Module._extensions..json (module.js:587:27) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/var/task/index.js:23:14) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10)

cd360 commented 7 years ago

OK, Still haven't cracked it but I'm further along and not getting syntax errors now.

The key for me was at step two to run npm install once after navigating to the src directory. You don't have to navigate to each dependency and run it for each one. Do it once only and at the end you should end up with a zip around the 6mb mark.

Also, when setting up the Alexa skill, make sure the locale is set to English US (the requirements for the code you paste in for utterance etc changes if you choose anything else). Also make sure all your services are setup in the same AWS regions and that the region matches your magicmirror.js file.

For those still struggling, have a look at the threads for this module on the magicmirror.builders site as joanaz is more active on there than on here from the looks of it.

joanaz commented 7 years ago

thanks @cd360! I'm based in the US east region, so i don't know the issues with AWS if you are in a different region. Best to keep all settings the same as mine, otherwise you'll have to change the code, and that still wouldn't guarantee no further issue. Thanks everyone for trying, let me know how it goes.

bitmoji

cd360 commented 7 years ago

@joanaz - I've done it. Got it working at last.

I have one question. How do you get it to stop playing a video once it has started?

joematoe commented 7 years ago

@cd360 - I'd like to hear how you succeeded. I encountered a similar issue. I can get a basic response, but the YouTube and Google Images isn't working for me yet, although I haven't troubleshot it yet.

On Wed, May 10, 2017 at 1:20 PM, cd360 notifications@github.com wrote:

@joanaz https://github.com/joanaz - I've done it. Got it working at last.

I have one question. How do you get it to stop playing a video once it has started?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joanaz/MirrorMirrorOnTheWallSkill/issues/7#issuecomment-300552680, or mute the thread https://github.com/notifications/unsubscribe-auth/AMY5Hc40NGGGhev9zIbbvNfg98j4_NqJks5r4fH5gaJpZM4MStC4 .

cd360 commented 7 years ago

@YoloJoe Hi Joe. I'll try and be specific. I'll presume you're US based, and you've gone with the default AWS regions of us-east-1 across Lambda and IoT.

I'm not 100% there yet as the image search isn't working for me yet, so I need to look into that, but the videos requested are working fine (although I can't get the YouTube screen to disappear after the video has finished....not yet at least.

So what have you managed to accomplish so far? If you say "Alexa, ask on the wall, say hello" does she say hello? If so, do you also get the text on the screen of your magicmirror? If not, then check your terminal and make sure there are no reports of invalid keypaths. I had this, and had to edit. I was referencing the fulll /home/pi/magicmirror/modules etc location rather than just ./crts/root-ca.crt for example. Once you've made sure there's no comms issues between your Pi and AWS IoT, then the next possibility is your YouTube API key.

For this sign into your Google API manager. You should have two project. One for Google Image search and the other for YouTube. Make sure the YouTube one is setup for YouTube Data API and not one of the other options. Also make sure the API is enabled, and maybe worth generating a new API and pasting that into your crts/keys.js file then rezip, and reupload to Lambda.

Also, make sure your zip file isn't more than say 8MB. If it is, chances are you've done an npm install on all dependencies individually as well which effectively installs twice leaving you with a much larger zip file to upload. i.e. you shouldn't need to upload via S3 (something I tripped up on early on).

I've got a couple areas I want to clean up:

Hope this helps. I'm no developer but let me know if you've got any problems and I'll help out where I can.

Cheers

AnonDEmaYan commented 7 years ago

Hello @joanaz It will be way better if you make a quick video for installing the module.

manojjenago commented 7 years ago

Hi, I have set up according to the instructions. I see a successful message when I try in AWS with the simulator. But when I append to Magic Mirror nothing happens. My Query is do I need Amazon Echo or DOT or it would work for the normal speakers as well. Thanks, Manoj

manojjenago commented 7 years ago

Hi ,

I have now installed the SAMPLE app from (https://github.com/alexa/alexa-avs-sample-app/wiki/Raspberry-Pi). But the problem is the magic mirror integration is not working mean the Wake up Word "User: "Alexa, On The Wall, hello" Does not work for me neither any text or youtube vidoe is shown. But as I have the sample app, ALEXA as a wake up word works.. Please guide Thanks, Manoj

htayminhlaing commented 6 years ago

@cd360, @joanaz how did you solve the syntax error ? I am having the same problem now. My zip file is 6.5 MB and I have run npm install only once in src folder. Thanks!

qgoehrig commented 6 years ago

Agreed, I'm having the same issue and I have been debugging for the past few hours with no luck. Any help would be appreciated.

soundarsurya commented 6 years ago

while executing my lambda function i get this error

"errorMessage": "Invalid connect options supplied.", "errorType": "Error", "stackTrace": [ "Object.Module._extensions..js (module.js:579:10)", "Module.load (module.js:487:32)", "tryModuleLoad (module.js:446:12)", "Function.Module._load (module.js:438:3)"

how could it be fixed..????

joanaz commented 5 years ago

anyone still having issues, please follow the new instructions https://joanaz.github.io/MirrorMirrorOnTheWallSkill/, and see if it helps. Thanks!