alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.13k stars 738 forks source link

TypeError: Cannot read property 'locale' of undefined #552

Closed naraenmd closed 5 years ago

naraenmd commented 5 years ago

Hi guys, can anyone help me with this issue

2019-05-21T09:47:51.281Z7b9825eb-7e05-4494-8980-6e6661cf13ef index.js.zip TypeError: Cannot read property 'locale' of undefined at Adapter.execute (/var/task/node_modules/ask-sdk-v1adapter/dist/adapter.js:126:42) at handler (/var/task/index.js:404:7)

hideokamoto commented 5 years ago

Will you check the skill request? eg). console.log(event)

naraenmd commented 5 years ago

yes @hideokamoto . Why am I facing this issue?any ideas please

hideokamoto commented 5 years ago

I'm no longer using alexa-sdk and v1-adapter. But i think we need to check the request parameters.

Will you add console.log() like this? You can check the entire request log in your CloudWatch Logs console.

exports.handler = function (event, context, callback) {
 console.log(event)
  const alexa = Alexa.handler(event, context);
  alexa.registerHandlers(handlers);
  alexa.execute();
};
ShenChen93 commented 5 years ago

@naraen1117

Sorry for responding late. Have you tried to log the event just like hideokamoto mentioned. It would be great if you can paste the event logs here, so we can use that to narrow down the problem.

Thanks, Shen

ShenChen93 commented 5 years ago

Close for now, please feel free to reopen