•   almost 5 years ago

Test APL Skills

Whenever I try to test one of the APL responses in Alexa simulator, I receive following error:
There was an issue processing your input.

No other information is available. Has anybody experienced this? How did you solve it?
How else can I test my skill?

  • 2 comments

  •   •   almost 5 years ago

    Hi Akshay,
    If you find a code snippet like below and you have designed the APL document with APL Authoring Tool in Alexa Developer Console you might encounter problems.
    APL document includes already type, version and document fields.

    You should use
    document: require(`./apl/main.json`).document,
    instead of
    document: require(`./apl/main.json`),

    It resolved my problem.

    Good luck.

    this.$alexaSkill.addDirective({
    type: 'Alexa.Presentation.APL.RenderDocument',
    version: '1.0',
    document: require(`./apl/main.json`),
    datasources: {},
    });

  •   •   almost 5 years ago

    Thanks a lot. This was one of the problems. But this didn't solve it completely.

    Fortunately, I have figured it out now. So, I'll just leave it here in case somebody else stumbles by.

    Turns out, each value inside 'datasources' HAS to be an object. It cannot be primitive. So, we can NOT have structures like this:
    "datasources": { "title", "My Title", "url": "http://example.com"}

    Instead, I had to do this:
    "datasources": { "data": { "title", "My Title", "url": "http://example.com"}}

    Strangely enough, APL authoring tool allows both. So it is near impossible to guess this.

Comments are closed.