Music Player app isn't working

There is some mistake in the project flow I guess. The prototype while testing gets disconnected in the middle. Kindly check the attached photos for reference and help me out.

Hi @ajaysrinic,

This same issue is shown in the training video. I had missed it myself, so I know it is easy to miss the solution in the video as well.

Please look at the running of the prototype in the video and you will see that the instructor gets the same issue, and also explains how to solve the issue.

Okay lemme check it once, thanks! :smile:

In the video, the user is getting the same error at the last code block whereas I’m getting the error at the first code block. I checked if the {artist_name} variable is global, it is! I’m not sure where the mistake is.

Hi @ajaysrinic,

Can you share the code which you have entered in the custom code blocks.

Take a screen shot of the code in all 3 custom code blocks and share it here.

I’ve attached all the 3 code blocks and the variable declaration.

Hi Ajay,

In the first code block that you have shared, convert the artist_name variable to lower case using the toLowerCase() function.

That is:

if(top_5_artists[i].name.toLowerCase() == artist_name.toLowerCase())

This should solve the problem for you.

I’m sorry but that didn’t work either!

Hi @ajaysrinic,

Please share a screenshot of the configuration of the capture block which captures the which artist the user selected.

My music player app is now working, I tried uploading it on Google but I couldn’t see the service account option in the Dialogflow Console and hence I couldn’t generate the JSON file for the project.

I’m facing the same issue but it’s confusing. The assistant doesn’t read out the list of the tracks specifically for Ed Sheeran and then ask for the preview else everything goes well.

The JSON object which you are adding to tracks array has two keys, name and previewURL which are not separated by a comma. Add a comma after name: track_list[i].name. :sweat_smile:

It would be extremely helpful if you explained how your project suddenly worked. Did you try anything else other that the steps mentioned above. I too am facing same problem and can’t get head or tails out of it.