alexa-samples/skill-sample-nodejs-fact

Error: Unhandled function is undefined....

Nsould opened this issue · 4 comments

I'm very new to making skills for Alexa, so trying to follow along but I'm stuck. Seems like I'm having a problem while testing using the skill code that's provided in this tutorial. When I test the sample code in the Lambda function code box, I get an error that states that the unhandled function is undefined. This seems to be a problem with a few folks, so I found the following code that helped to solve the error that I inserted in the handlers section:

'Unhandled': function () {
this.emit(':ask', HELP_MESSAGE, HELP_REPROMPT);
}

The error disappears, but outside of testing out launch, help, & stop/cancel intents, I am not able to get the correct responses to the my intents when I enter my utterances. The only response I can get to the utterances for the GetNewFactIntent is whatever is in the unhandled function (i.e, HELP_MESSAGE).

Hope this makes sense. Can anyone help???

Yep ... Here you will find outdated work, not supported by Amazon? look for more current demos before time investment

Where have you been testing the skill ?
Could you copy & paste your invoke event parameters ?

example

{
  'session': {
    'new': true,
    'sessionId': 'amzn1.echo-api.session.[unique-value-here]',
    'attributes': {},
    'user': {
      'userId': 'amzn1.ask.account.[unique-value-here]'
    },
    'application': {
      'applicationId': 'amzn1.ask.skill.[unique-value-here]'
    }
  },
  'version': '1.0',
  'request': {
    'locale': 'en-US',
    'timestamp': '2016-10-27T18:21:44Z',
    'type': 'LaunchRequest',
    'requestId': 'amzn1.echo-api.request.[unique-value-here]'
  },
  'context': {
    'AudioPlayer': {
      'playerActivity': 'IDLE'
    },
    'System': {
      'device': {
        'supportedInterfaces': {
          'AudioPlayer': {}
        }
      },
      'application': {
        'applicationId': 'amzn1.ask.skill.[unique-value-here]'
      },
      'user': {
        'userId': 'amzn1.ask.account.[unique-value-here]'
      }
    }
  }
}

@Nsould Do you still have questions? There have been some updates to this sample since we released the new version of the SDK. Take a look and let me know.

closing due to inactivity. Please reopen or create a new issue if help is still needed.