7

I always get the error 'Application ID is not set' in my log files while I have set this ID like they say in this example:

const APP_ID = 'amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';

How can I fix this problem?

Michael Innes
  • 2,045
  • 5
  • 25
  • 41
Jurik
  • 3,244
  • 1
  • 31
  • 52

1 Answers1

31

Problem is that this example is deprecated.

At the botton of your index.js you will find this code:

exports.handler = (event, context) => {
    const alexa = Alexa.handler(event, context);
    alexa.APP_ID = APP_ID;
    // To enable string internationalization (i18n) features, set a resources object.
    alexa.resources = languageStrings;
    alexa.registerHandlers(handlers);
    alexa.execute();
};

And alexa.APP_ID = APP_ID; is wrong. They changed it to alexa.appId.

So if you change your line to:

alexa.appId = APP_ID;

You will not get this error message anymore. Here is the documentation.

brianfit
  • 1,829
  • 1
  • 19
  • 34
Jurik
  • 3,244
  • 1
  • 31
  • 52