4
votes

I am trying to setup a sample Alexa skill set with sample 'hello world' lambda function. But when testing on Alexa simulator, showing There was a problem with the requested skills response as shown in below. enter image description here

I have created a sample Alexa skill set and connected with AWS lambda function using ARN in endpoint section.

3

3 Answers

2
votes

One simple way to debug this issue is copying the input JSON from Alexa skill simulator and paste it in the lambda's configure test events. Now run test and it'll generate all the error logs in the lambda itself, for your easy reference.

If you've no clue on the error log, edit your question with the logs so that some experienced people could help. Thanks.

1
votes

"There was a problem with the requested skill's responseā€ means that there is something wrong with the response json from the Lambda function. It might be null or invalid.

In your case, check the LaunchRequest handler for any issues.

A sample LaunchRequest handler in ask-nodejs-sdk-v2 will be like:

const LaunchRequestHandler = {
  canHandle(handlerInput) {
    return handlerInput.requestEnvelope.request.type === 'LaunchRequest';
  },
  handle(handlerInput) {
    console.log('Inside LaunchRequestHandler');
    return handlerInput.responseBuilder
      .speak('Welcome to my ABC skill')
      .reprompt('Welcome to my ABC skill')
      .getResponse();
  },
};
0
votes

It sounds like something is throwing in your Lambda code. Since you've deployed to Lambda, you could check the CloudWatch logs for any error messages. This will help you rather than debugging blind.

It might also worth setting up some way to run and debug the code locally too.