Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
LinusSkucas opened this issue Jun 23, 2017 · 41 comments
Assignees

Comments

@LinusSkucas
Copy link

LinusSkucas commented Jun 23, 2017

I am very new at developing with alexa. I followed to tutorial but when I get into the testing section it gives me an error:
The remote endpoint could not be called, or the response it returned was invalid.
Don't know what I did wrong - the arn is copied correctly.
I'm following the tutorial here: https://developer.amazon.com/alexa-skills-kit/tutorials/fact-skill-4

@alephnode
Copy link

I'm working through this tutorial tonight and can confirm that I'm getting the same error on the testing section.

@alephnode
Copy link

alephnode commented Jun 23, 2017

Looks like tonight (06/22/2017) the N. Virginia center is experiencing issues with Lambda services:

https://status.aws.amazon.com/

Error message: 6:26 PM PDT We are investigating increased error rates for Lambda integrations and Custom Authorizers in the US-EAST-1 Region.

I just tried a separate tutorial (https://github.com/alexa/skill-sample-nodejs-howto) and selected the Ireland service center and passed the testing phase.

@LinusSkucas
Copy link
Author

Thanks, should of checked there.

@swapnilsaykar
Copy link

I am still facing the same issue in both N. Virginia and Ireland

@LinusSkucas
Copy link
Author

LinusSkucas commented Jun 25, 2017

Are you sure? I just checked status.aws.amazon.com and it looked all right.

@LinusSkucas LinusSkucas reopened this Jun 25, 2017
@swapnilsaykar
Copy link

Yup - I am sure. This is the error I am getting as per my cloudwatch logs:

2017-06-25T17:21:41.029Z c0c17851-59ca-11e7-b02a-b1b3a688e889
{
"errorMessage": "No 'Unhandled' function defined for event: Unhandled",
"errorType": "Error",
"stackTrace": [
"AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:194:15)",
"AlexaRequestEmitter.ValidateRequest (/var/task/node_modules/alexa-sdk/lib/alexa.js:160:23)",
"HandleLambdaEvent.i18n.use.init (/var/task/node_modules/alexa-sdk/lib/alexa.js:113:29)",
"/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:190:9",
"done (/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:281:21)",
"/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:302:7",
"I18n.loadResources (/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:238:7)",
"I18n.changeLanguage (/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:301:10)",
"load (/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:186:14)",
"I18n.init (/var/task/node_modules/alexa-sdk/node_modules/i18next/dist/commonjs/i18next.js:195:7)"
]
}

@swapnilsaykar
Copy link

I tried adding sessions handler as suggested in this:
amazon-archives/skill-sample-nodejs-calendar-reader#6

var newSessionHandlers = {
'LaunchRequest': function () {
this.handler.state = states.SEARCHMODE;
this.emit(':ask', skillName + " " + welcomeMessage, welcomeMessage);
},
'Unhandled': function () {
this.emit(':ask', HelpMessage, HelpMessage);
}
};

But still getting the same error

@LinusSkucas
Copy link
Author

In the developer console go to the testing page for your skill and follow the instructions to test it. When you click ask [your skill name] does it return The remote endpoint could not be called, or the response it returned was invalid.?

@swapnilsaykar
Copy link

Yes - that is what is returns. In the developer console I am going to the testing page for the skill and then following the instructions.

I am getting the error - The remote endpoint could not be called, or the response it returned was invalid.

@gautamdevkhanna
Copy link

Same for me as well...

@trinipeng
Copy link

I am getting the same error.

@LinusSkucas
Copy link
Author

Check what the skill is returning. If something is off in the response, then Alexa won't like it. Test the skills response in the AWS console.

@lawardy
Copy link

lawardy commented Nov 19, 2017

In Lambda, check timeout value (basic setting >> timeout).

When I used default 3 secs, I got the same error. When I changed to 30 secs, it works.

Maybe it need more time to load the 1st time or 3 secs is just not enough.

@AITB
Copy link

AITB commented Nov 22, 2017

I'm having this issue too. The solutionby @lawardy didn't solve my issue.
I am getting this issue from following both the fact and trivia skill tutorials. I have followed these before and having workings skills for both of these. My recent skills, following the same tutorials, all show this error. I have also tried to change the default endpoint of my broken skills to one of the skills that does work's lambda but it still shows the same issue. Which is why I don't think the issue is with the aws lambda part.

@LinusSkucas
Copy link
Author

LinusSkucas commented Nov 25, 2017

I've given up on using this and have switched entirely to flask-ask. This is far the best (in my opinion) sdk.

@melrom
Copy link

melrom commented Nov 27, 2017

Hi - I was getting this error but it was because the name that I gave my intent in the skills builder did not match the js example for lambda. Namely, GetNewFactIntent -- you must name the intent in the skills builder to be exactly the same (or alternatively, change this line in the lambda code example [currently, it's line 112]). Just figured I would add this since I was getting the same error in case it helps someone else.

@ConorMatthews
Copy link

That worked for me!
Thanks so much!

@nstajduhar
Copy link

@ConorMatthews How did you fix this??

@ConorMatthews
Copy link

@nstajduhar I followed @melrom instructions because it was calling an intent list that was not there because when setting the intents up i did not follow the instructions advice to call it GetNewFactIntent, but called it otherwise. In the code it tries to call GetNewFactIntent however it was not named that so you need to go into your code and change GetNewFactIntent to whatever you called your intent list.
Hope this helps

@nstajduhar
Copy link

@ConorMatthews where is this GetNewFactIntent? I have no clue where to find that

@ConorMatthews
Copy link

@nstajduhar if you go to the example code where you changed the facts, on line 112 there should be the code, just change that.
Alternatively change your intent lists name to GetNewFactIntent

@nstajduhar
Copy link

@ConorMatthews facts? I didn't come across that? Can you link a screenshot

@ConorMatthews
Copy link

Are you using https://developer.amazon.com/alexa-skills-kit/tutorials/fact-skill-1 as a starting point?
If not try it

@ConorMatthews
Copy link

That is a tutorial made by amazon

@nstajduhar
Copy link

I have done all this but I don't see anywhere with a line number 112

@nstajduhar
Copy link

@ConorMatthews nvm I got it now thanks!

@naik899
Copy link

naik899 commented Dec 21, 2017

@ConorMatthews How did it get fixed. Can you help me with this?

@soundarsurya
Copy link

can anyone help me to fix the same problem for mt code...????
i have planned to make an automation so when it call form skill it gives the same error....

@naik899
Copy link

naik899 commented Jan 30, 2018

@soundarsurya I got it fixed by making my api response faster.

@soundarsurya
Copy link

@naik899 could you explain in detail please...??

@Juresse
Copy link

Juresse commented Feb 25, 2018

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

@naik899
Copy link

naik899 commented Feb 27, 2018

@soundarsurya @Juresse This error can be for couple of reasons as per my experience with Alexa skill set

  1. Once it was because the name that I gave my intent in the skills builder did not match the js example for lambda
  2. In Lambda, check timeout value (basic setting -> timeout). When I changed to 10 secs, it works.

@soundarsurya
Copy link

@naik899 thanks for the response.
i have changed the execution time but i am getting the same?
have any other way to fix??
?

@dm-grinko
Copy link

dm-grinko commented Apr 11, 2018

Guys, you should increase time and use HTTPS instead of HTTP. Hope it helps someone.

@soundarsurya
Copy link

soundarsurya commented Apr 11, 2018 via email

@franklin-lobb
Copy link
Contributor

@soundarsurya Are you still experiencing a problem? I took a look at the history and I'm not sure what you're experiencing. I have not seen this (unmodified) sample hit the timeout threshold, so I would lean towards something else. However, since this sample has been updated, you have a few options - start over with the latest code which uses the new version of the SDK, use the Serverless Application Repository in AWS Lambda to create the skill backend code, or continue troubleshooting this. LMK what you prefer.

@soundarsurya
Copy link

soundarsurya commented May 4, 2018 via email

@franklin-lobb
Copy link
Contributor

Is the endpoint a Lambda function or an SSL endpoint? If it's a Lambda endpoint, I would check to confirm the full arn is present and correct in the skill endpoint configuration (with no extra spaces), the Lambda function has the Alexa Skill Kit trigger and the Skill ID verification in the trigger is either not enabled, or is set to the correct skill id.

More info on endpoint: https://developer.amazon.com/docs/devconsole/build-your-skill.html#custom-model
More Info on Lambda hosting: https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html

@franklin-lobb franklin-lobb self-assigned this May 16, 2018
@franklin-lobb
Copy link
Contributor

@soundarsurya are you still experiencing this? If so, can you add some detail about your configuration? http endpoint or Lambda? if http, what kind of certificate are you using? Do your server logs show any sort of activity? If Lambda, does Alexa have permission to invoke your Lambda function? Are there any entries at all in the CloudWatch log?

@chfw
Copy link

chfw commented Nov 29, 2018

please follow the youtube video here to get over the lambda connection issue: https://www.youtube.com/watch?v=QkbXjknPoXc

@franklin-lobb
Copy link
Contributor

closing due to age

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests