Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skill Simulation always returns undefined #52

Closed
DronNick opened this issue Nov 7, 2020 · 7 comments
Closed

Skill Simulation always returns undefined #52

DronNick opened this issue Nov 7, 2020 · 7 comments
Labels
bug Something isn't working response needed use this if you need more information regarding the issue

Comments

@DronNick
Copy link

DronNick commented Nov 7, 2020

Desktop (please complete the following information):

OS: Windows_NT x64 10.0.18362
Visual Studio Code Version: 1.51.0
Alexa Skills Toolkit Version: 2.1.0
Git Version: git version 2.17.1.windows.2

Question

While trining to invoke the skill in the simulator I get the following error:
[error - 2020-11-07 22:34:15.671Z] Simulation in progress.

The simulator returns "undefined"

@nikhilym
Copy link
Contributor

nikhilym commented Nov 9, 2020

Hey @DronNick , thanks for raising the issue. To investigate this better, can you provide the skill id and the exact reproduction steps you tried? Also, are you trying to use the simulator on the same profile that you created/cloned the skill?

@nikhilym nikhilym added bug Something isn't working response needed use this if you need more information regarding the issue labels Nov 9, 2020
@DronNick
Copy link
Author

DronNick commented Nov 9, 2020

Hello @nikhilym , I use simulator on the same profile.

ask-resouces.json:

{
  "askToolkitResourcesVersion": "2020-04-15",
  "profiles": {
    "default": {
      "skillId": "amzn1.ask.skill.a7c7d3a8-1a49-48bc-a0ea-bd7395c476d8",
      "skillInfrastructure": {
        "type": "@ask-cli/hosted-skill-deployer"
      }
    }
  }
}

Steps to reproduce
Commit to:
https:// git-codecommit.us-east-1.amazonaws.com/v1/repos/a7c7d3a8-1a49-48bc-a0ea-bd7395c476d8

Deploy skill:
[info - 2020-11-09 22:07:11.005Z] Skill build succeeded

Test skill=>Open simulator=> Type invocation and intent (the same string worked before):

[info - 2020-11-09 22:40:19.558Z] Activating extension 
[debug - 2020-11-09 22:40:19.559Z] Registering commands in the extension 
[debug - 2020-11-09 22:40:19.624Z] Registering views in the extension 
[debug - 2020-11-09 22:40:19.731Z] Calling method: welcomeScreen.getHtmlForView 
[verbose - 2020-11-09 22:40:19.731Z] Calling method: checkGitInstallation 
[verbose - 2020-11-09 22:40:19.731Z] Calling method: isGitInstalled 
[verbose - 2020-11-09 22:40:19.731Z] Executing git command : git --version 
[debug - 2020-11-09 22:40:20.177Z] Calling method: renderView, args:  [{"name":"welcomeScreen","js":false,"args":{"enabled":"checked"}}]
[debug - 2020-11-09 22:40:20.178Z] Calling method: interpolate, args:  [{"enabled":"checked"}]
[debug - 2020-11-09 22:40:20.179Z] Registering event handlers in the extension 
[debug - 2020-11-09 22:40:20.179Z] Registering statusbar in the extension 
[verbose - 2020-11-09 22:40:20.180Z] Updating profile icon in the extension 
[debug - 2020-11-09 22:40:20.180Z] Registering treeviews in the extension 
[verbose - 2020-11-09 22:40:20.192Z] Calling method: findSkillFolders 
[debug - 2020-11-09 22:40:20.544Z] Calling method: welcomeScreen.onViewChangeListener 
[verbose - 2020-11-09 22:40:20.953Z] Calling method: getOrInstantiateGitApi 
[debug - 2020-11-09 22:40:20.955Z] Checking if extension version is latest 
[debug - 2020-11-09 22:40:31.329Z] Calling method: h.getChildren 
[verbose - 2020-11-09 22:40:31.329Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:31.329Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:31.330Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:31.330Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:31.330Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:31.330Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:31.330Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:31.331Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:31.332Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"innovaphone myApps"}},null]
[debug - 2020-11-09 22:40:31.333Z] Calling method: c.getChildren 
[debug - 2020-11-09 22:40:31.336Z] Calling method: a.getChildren 
[verbose - 2020-11-09 22:40:31.336Z] Calling method: a.addRootResources 
[debug - 2020-11-09 22:40:31.336Z] Calling method: h.getTreeItem 
[verbose - 2020-11-09 22:40:31.336Z] Calling method: c.addRootResources 
[debug - 2020-11-09 22:40:31.336Z] Calling method: a.getTreeItem 
[debug - 2020-11-09 22:40:31.336Z] Calling method: a.getTreeItem 
[debug - 2020-11-09 22:40:31.337Z] Calling method: c.getTreeItem 
[debug - 2020-11-09 22:40:31.337Z] Calling method: c.getTreeItem 
[debug - 2020-11-09 22:40:31.337Z] Calling method: c.getTreeItem 
[debug - 2020-11-09 22:40:31.357Z] Calling method: h.getChildren 
[verbose - 2020-11-09 22:40:31.357Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:31.357Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:31.358Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:31.358Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:31.358Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:31.358Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:31.358Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:31.359Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:31.359Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"innovaphone myApps"}},null]
[verbose - 2020-11-09 22:40:31.360Z] Calling method: isSkillHosted, args: ["amzn1.ask.skill.a7c7d3a8-1a49-48bc-a0ea-bd7395c476d8"]
[debug - 2020-11-09 22:40:32.224Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:32.224Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:32.224Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:32.225Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:32.225Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:36.064Z] Calling method: h.getChildren 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:36.064Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:36.065Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:36.066Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:36.066Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"innovaphone myApps"}},null]
[debug - 2020-11-09 22:40:36.067Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:36.067Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:36.067Z] Calling method: h.getTreeItem 
[debug - 2020-11-09 22:40:37.676Z] Calling method: askContainer.skillsConsole.simulateSkill 
[debug - 2020-11-09 22:40:37.677Z] Calling method: simulateSkill.getHtmlForView 
[debug - 2020-11-09 22:40:37.678Z] Calling method: renderView, args:  [{"name":"simulateSkill","js":true,"args":{"simulateCss":{"$mid":1,
"path":"/file///c:/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/media/simulate.css",
"scheme":"vscode-webview-resource",
"authority":"93c566cd-0c9e-4ea5-aad4-f7ba5a177e85"},
"aplRenderUtils":{"$mid":1,
"path":"/file///c:/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/media/previewApl/aplRenderUtils.js",
"scheme":"vscode-webview-resource",
"authority":"93c566cd-0c9e-4ea5-aad4-f7ba5a177e85"},
"customJavascript":"vscode-webview-resource://93c566cd-0c9e-4ea5-aad4-f7ba5a177e85/file///c%3A/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/node_modules/apl-viewhost-web/index.js"}}]
[debug - 2020-11-09 22:40:37.678Z] Calling method: interpolate,
 args:  [{"simulateCss":{"$mid":1,"path":"/file///c:/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/media/simulate.css",
"scheme":"vscode-webview-resource","authority":"93c566cd-0c9e-4ea5-aad4-f7ba5a177e85"},
"aplRenderUtils":{"$mid":1,"path":"/file///c:/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/media/previewApl/aplRenderUtils.js",
"scheme":"vscode-webview-resource",
"authority":"93c566cd-0c9e-4ea5-aad4-f7ba5a177e85"},
"customJavascript":"vscode-webview-resource://93c566cd-0c9e-4ea5-aad4-f7ba5a177e85/file///c%3A/Users/user/.vscode/extensions/ask-toolkit.alexa-skills-kit-toolkit-2.1.0/node_modules/apl-viewhost-web/index.js"}]
[debug - 2020-11-09 22:40:37.796Z] Calling method: welcomeScreen.onViewChangeListener 
[debug - 2020-11-09 22:40:37.796Z] Calling method: simulateSkill.onViewChangeListener 
[debug - 2020-11-09 22:40:39.484Z] Successfully uploaded telemetry data. 
[debug - 2020-11-09 22:40:39.803Z] Calling method: simulateSkill.onReceiveMessageListener 
[verbose - 2020-11-09 22:40:39.803Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:39.803Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:39.803Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:39.803Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:39.804Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:39.804Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:39.805Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"innovaphone myApps"}},null]
[verbose - 2020-11-09 22:40:39.805Z] Calling method: simulateSkillHelper.handleSkillStatusMessageFromWebview 
[verbose - 2020-11-09 22:40:39.805Z] Calling method: simulateSkillHelper.checkSkillStatus 
[debug - 2020-11-09 22:40:39.806Z] Calling method: simulateSkill.onReceiveMessageListener 
[verbose - 2020-11-09 22:40:39.806Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:39.806Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:39.806Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:39.806Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:39.807Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:39.807Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:39.807Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"innovaphone myApps"}},null]
[verbose - 2020-11-09 22:40:39.808Z] Calling method: simulateSkillHelper.handleLocaleMessageFromWebview 
[debug - 2020-11-09 22:40:51.766Z] Calling method: simulateSkill.onViewChangeListener 
[debug - 2020-11-09 22:40:57.889Z] Calling method: simulateSkill.onViewChangeListener 
[debug - 2020-11-09 22:40:58.632Z] Calling method: simulateSkill.onReceiveMessageListener 
[verbose - 2020-11-09 22:40:58.632Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:58.632Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:58.633Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:58.633Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:58.633Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:58.634Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:58.634Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"in***ps"}},null]
[verbose - 2020-11-09 22:40:58.635Z] Calling method: simulateSkillHelper.handleSkillStatusMessageFromWebview 
[verbose - 2020-11-09 22:40:58.635Z] Calling method: simulateSkillHelper.checkSkillStatus 
[debug - 2020-11-09 22:40:58.636Z] Calling method: simulateSkill.onReceiveMessageListener 
[verbose - 2020-11-09 22:40:58.636Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:40:58.636Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:40:58.636Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:40:58.636Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:40:58.636Z] Calling method: getAskState 
[verbose - 2020-11-09 22:40:58.637Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:40:58.637Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"in***pps"}},null]
[verbose - 2020-11-09 22:40:58.637Z] Calling method: simulateSkillHelper.handleLocaleMessageFromWebview 
[debug - 2020-11-09 22:41:21.624Z] Calling method: simulateSkill.onReceiveMessageListener 
[verbose - 2020-11-09 22:41:21.624Z] Calling method: getSkillDetailsFromWorkspace 
[verbose - 2020-11-09 22:41:21.624Z] Calling method: getSkillFolderInWs 
[verbose - 2020-11-09 22:41:21.624Z] Calling method: doesWorkSpaceExist 
[verbose - 2020-11-09 22:41:21.624Z] Calling method: getAskResourceConfig 
[verbose - 2020-11-09 22:41:21.625Z] Calling method: getAskState 
[verbose - 2020-11-09 22:41:21.626Z] Calling method: getSkillManifestFromWorkspace 
[verbose - 2020-11-09 22:41:21.627Z] Calling method: getSkillNameFromLocales, args: [{"de-DE":{"name":"inn***ps"}},null]
[verbose - 2020-11-09 22:41:21.627Z] Calling method: simulateSkillHelper.handleUtteranceMessageFromWebview 
[verbose - 2020-11-09 22:41:21.627Z] Calling method: simulateSkillHelper.getSimulationResponse, args:  ["sta***en"]
[verbose - 2020-11-09 22:41:22.270Z] Retrying simulation request, attempt: 1 
[error - 2020-11-09 22:41:22.554Z] Simulation in progress. 

[verbose - 2020-11-09 22:41:23.054Z] Retrying simulation request, attempt: 2 
[error - 2020-11-09 22:41:23.326Z] Simulation in progress. 

[verbose - 2020-11-09 22:41:24.327Z] Retrying simulation request, attempt: 3 
[error - 2020-11-09 22:41:24.602Z] Simulation in progress. 

[verbose - 2020-11-09 22:41:26.603Z] Retrying simulation request, attempt: 4 
[error - 2020-11-09 22:41:26.882Z] Simulation in progress. 

[verbose - 2020-11-09 22:41:30.883Z] Retrying simulation request, attempt: 5 
[verbose - 2020-11-09 22:41:31.156Z] Calling method: simulateSkillHelper.formatAlexaResponse 

Talk to Alexa screen shows undefined as answer

It seems to be a timeout issue - after a while it stops to work and output of the "ASK Toolkit" shows only Simulation in progress.

How can i see Lambda function logs?

@nikhilym
Copy link
Contributor

Hey @DronNick , you are right. It looks like the invocation failed from the service side and the toolkit is timing out expecting a response. I will check with the service team regarding this skill invocation. To make sure this is a service side issue instead of the toolkit, can you check through developer console or through ask cli if the skill invocation is working for this skill and the skill code please?

@nikhilym
Copy link
Contributor

Hey @DronNick , just checking back if you were able to get this working. Please let us know. Thanks.

@DronNick
Copy link
Author

Hello @nikhilym ,

i figured out - it was an issue with the lambda function, it was not starting at all because of the missing modules (deploying failed silently because of yarn module problem). It was only visible in the CloudWatch Logs. I expected that Alexa Skills Toolkit shows this log in the VS Code console. Otherwise what is the purpose of the simulator, if i can not see any error messages localy?

@nikhilym
Copy link
Contributor

@DronNick thanks for the update and sorry for the inconvenience. Glad you got it working.

I expected that Alexa Skills Toolkit shows this log in the VS Code console. Otherwise what is the purpose of the simulator, if i can not see any error messages localy?

You are right, the local simulator should try and retrieve the exact error messages as we do in the web simulator. However, since we use the skill simulation API to get the skill simulation details, it looks like the service is not sending us the correct information regarding these errors. We will check with the team about this.

Alternatively, we will also check with the hosted skills team if we can get the links for the cloud watch logs for hosted skills, so that we can include it in the skill actions pane.

I logged the feature request #61 . Please add any missing information or any other context to that issue. Thanks.

@DrMemoryFish
Copy link

im also getting this error, i may need some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working response needed use this if you need more information regarding the issue
Projects
None yet
Development

No branches or pull requests

3 participants