jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.68k stars 309 forks source link

:bug: Fix missing skillId issue for async Alexa deploys #1617

Closed sadlowskij closed 8 months ago

sadlowskij commented 8 months ago

Proposed Changes

Using the --async flag for alexa deploys calls getImportStatus right after deploying the skill. My testing showed that this leads to the response not being complete, see example:

image

As you can see the result here only contained status, while the skill property is not there. As Jovo is trying to access status.skill.skillId, this leads to the error in the screenshot.

I found out that this seems to be dependent of the time passed since the import. Waiting a moment before requesting the import status fixes this issue, see this image that shows the status result: image

This is only relevant for --async deploys, due to non async deploys ignore IN_PROGRESS responses already.

I was not sure whether to put this line of code before the getImportStatus call as it is now, or inside getImportStatus. I think it's a matter of preference, feel free to change or request changes if necessary.

Types of Changes

Checklist