Failure when application IDs don't match
cosinekitty opened this issue · 6 comments
Hi, great tool, but I'm running into an issue. Now that I figured out how to correctly set my application ID:
I'm getting an error when I try to test locally:
info: ------
info: START RequestId: 8041c2be-ed30-b681-e106-359861d4d40d
The applicationIds don't match: amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe and amzn1.ask.skill.<redacted>
error: FAILING!!
info: END
error: Error
error: ------
The <redacted>
part in the log above is to hide my actual skill ID.
In http://localhost:3000, I tried to edit the request JSON but that box is read-only. How can I configure the request to have the correct application ID?
Thanks!
So wherever you are setting your appId
you should do something like this:
if ('undefined' === typeof process.env.DEBUG) {
alexa.appId = '...';
}
Alexa Skill Test will automatically set debug. I'll make sure to add this to the README.
Thank you, Taylor. That does help. However, the reason I got into this problem was because I kept noticing this in the output:
Warning: Application ID is not set
It turns out the Amazon sample code has a mistake in it where I was setting alexa.APP_ID instead of alexa.appId. See here:
So as soon as I fixed that, I ran into this problem. With your suggested change, the warning is back when I use alexa-skill-test. I would recommend the following:
- Add an extra box in http://localhost:3000 where we can enter the actual app ID for our skill.
- Include that app ID in the generated JSON request.
- Persist the app ID in localStorage so the developer doesn't have to paste it in every time they test.
That way we can avoid the warning plus we don't have to change our code to accommodate the tool.
I would be willing to create a pull request for this if you agree it would be a useful approach.
I feel like it would be pretty annoying to have to input an app ID. Just not setting the app ID in dev seems much easier. Would love to hear others thoughts.
I thought about this some more. Maybe this is simpler: how hard would it be to allow us to edit the request JSON directly before it is submitted to the skill under test? In other words, make the box that shows the request JSON be editable instead of read-only? Then we can change the app ID if we want, or make any other changes to see how our skill reacts.
That capability should actually be in the latest version if you update :)
I just upgraded and yes, it works great! Editing the request JSON is handy for adding an accessToken for account linking also. Thanks for providing this tool. It is saving me a huge amount of time.