after setting up everything i am getting this error in while testing the skill in Alexa developer There was a problem with the requested skill's response then i put that json response in lambda test and i got the following
{ "errorType": "TypeError", "errorMessage": "Cannot convert undefined or null to object", "trace": [ "TypeError: Cannot convert undefined or null to object", " at Function.keys (<anonymous>)", " at Object.NewSession (/var/task/eventHandlers.js:28:20)", " at AlexaRequestEmitter.emit (events.js:198:13)", " at AlexaRequestEmitter.EventEmitter.emit (domain.js:448:20)", " at AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:161:10)", " at AlexaRequestEmitter.HandleLambdaEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:124:23)", " at AlexaRequestEmitter.value (/var/task/node_modules/alexa-sdk/lib/alexa.js:74:31)", " at Runtime.exports.handler (/var/task/index.js:20:11)", " at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)" ] }
Log output
The section below shows the logging calls in your code. These correspond to a single row within the CloudWatch log group corresponding to this Lambda function. Click here to view the CloudWatch log group.
START RequestId: f8127006-ae68-429b-b470-302b76bf3619 Version: $LATEST 2020-01-06T04:38:56.104Z f8127006-ae68-429b-b470-302b76bf3619 INFO Warning: Application ID is not set 2020-01-06T04:38:56.144Z f8127006-ae68-429b-b470-302b76bf3619 INFO {"eventType":"SessionStarted","event":{"userId":"amzn1.ask.account.AH5DAZ5QFPLU5NKA5XSU7PKCHUK4KCQTEUB3BBOSQ7COBQQ5EKW45X2445QZXZQJHO5HLXHIWSCPQ6TR2XYOZCPBG3GKDPQVWZK4WQN4OUWCNUW52WSLMZ2BBD4AANIR5SWIWQ5TJ6SSWN6KN5ZE73Q5UC6IBMONJ6MU6TRLLKFWUV3RKV7FE5P3SWODM23WJDXRVYBYDNZRRPY","sessionId":"amzn1.echo-api.session.92ab8d8e-8262-4f21-9f54-e556d78a8a6f","datestring":"2020-01-06T04:38:56.144Z"}} 2020-01-06T04:38:56.163Z f8127006-ae68-429b-b470-302b76bf3619 INFO Unexpected exception 'TypeError: Cannot convert undefined or null to object': TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at Object.NewSession (/var/task/eventHandlers.js:28:20) at AlexaRequestEmitter.emit (events.js:198:13) at AlexaRequestEmitter.EventEmitter.emit (domain.js:448:20) at AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:161:10) at AlexaRequestEmitter.HandleLambdaEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:124:23) at AlexaRequestEmitter.value (/var/task/node_modules/alexa-sdk/lib/alexa.js:74:31) at Runtime.exports.handler (/var/task/index.js:20:11) at Runtime.handleOnce (/var/runtime/Runtime.js:66:25) 2020-01-06T04:38:56.163Z f8127006-ae68-429b-b470-302b76bf3619 ERROR Invoke Error {"errorType":"TypeError","errorMessage":"Cannot convert undefined or null to object","stack":["TypeError: Cannot convert undefined or null to object"," at Function.keys (<anonymous>)"," at Object.NewSession (/var/task/eventHandlers.js:28:20)"," at AlexaRequestEmitter.emit (events.js:198:13)"," at AlexaRequestEmitter.EventEmitter.emit (domain.js:448:20)"," at AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:161:10)"," at AlexaRequestEmitter.HandleLambdaEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:124:23)"," at AlexaRequestEmitter.value (/var/task/node_modules/alexa-sdk/lib/alexa.js:74:31)"," at Runtime.exports.handler (/var/task/index.js:20:11)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]} END RequestId: f8127006-ae68-429b-b470-302b76bf3619 REPORT RequestId: f8127006-ae68-429b-b470-302b76bf3619 Duration: 96.25 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 102 MB Init Duration: 567.43 ms
i have tried adding unhandled function but nothing happened i am unable to understand the issue please help!!