Launch always goes to incorrect intent



I am trying to build music skill based on Jovo podcast-player example, I am having hard time debugging one issue.
In this I am asking user to choose from different intent, when user choose Namokar mantra, it never goes to that intent it always go to Firstepisode intent, even though none of the phrase match.



@jan @H1Gerd Is there any routing config we have to do which i am missing, podcast is the example I used and I am making changes? Even if i do toIntent() its not going to correct one from Launch. It always go to firstepisodeIntent.


Have you tried restarting the development server? ctrl + c and then jovo run again.

Could not find the route "NextIntent" in your handler function

What platform are you using to debug? If you’re trying to run this on an Amazon Alexa, I would make sure that the intents that you defined (Namokar, Songs, etc.) are all showing up in the Alexa development console. Also, do you know if the program is going to the FirstEpisodeIntent directly, or are you getting the UnhandledIntent and being re-routed to FirstEpisodeIntent?


Yes… i did that several time… but no luck


If i use toIntent it gives me unhandled exception, but if i run launch and respond to launch request command. It takes me to FirstEpisodeIntent directly. I put debug point in FirstEpisodeIntent and i can see its going there.


If i add toIntent in Launch i get unhandled error, where as if comment that line it will go to FirstEpisodeHandle. I am sharing link to all project files in case that helps…


Hi @akshayru, I don’t know if it matters, but I’ve always used the argument within the toIntent call surround by quotes. In your case, I would try this.toIntent('FirstEpisodeIntent');

I also recommend as good practice creating an Unhandled() intent handler with a console.log just to see if your skill is passing through that handler unexpectedly.

When you view your skill in the Alexa Developer Console, do you see all of your intents?


Yes, seems like the problem is that the intent name is not a string. Thanks for spotting @Ben_Hartman!

A few additional things.

Never use stuff like ask or tell after an intent redirect like toIntent.

I recommend using a return statement for redirects:

    // ...

   return this.toIntent('FirstEpisodeIntent'); // last thing to happen in ths handler

closed #10