alexa-samples/skill-sample-nodejs-fact

Skill works fine in Simulator, but anything beyond the opening invocation fails to work

TylerNoblett opened this issue · 2 comments

Hi! I followed this tutorial and submitted a skill to Amazon. I forgot about and came back two months later to see it had a fair amount of use, but the 1 review posted said that it opened but that subsequent commands didn't work. I checked the metrics, and that appears to be the case for everyone who downloaded it.

I didn't have any issues in the simulator, but when I tested it on echoism.io I had the same issue. Here's the code I'm using compared to the source code, and some screenshots. What am I doing incorrectly? My app is called "Good Questions" fyi.

Here's the index code comparison.
Here's the json file. It looks a little different, but when I submitted it to Amazon it was the same and it appears that the code was deprecated and the skill builder updated it automatically.

Here's a screenshot of my skill builder -
getnewfactintent

and my metrics
metrics

Let me know if you need anything else - thanks in advance!

I figured it out - I replaced.

//this.response.speak(speechOutput); 
//this.emit(':responseReady'); 

with
this.emit(':ask', speechOutput, HELP_MESSAGE);
and now it works just fine

yeah, responses in alexa-sdk can be defined in either way. If you use the :responseReady style and want to accept user input then it needs to .listen(..) otherwise it is the same as a :tell.

this.response.speak(speechOutput)
             .listen(repromptSpeech);
this.emit(':responseReady');