actions-on-google / assistant-conversation-testing-nodejs

Assistant conversation testing library
Apache License 2.0
21 stars 16 forks source link

Error: sendInteraction API call failed: Error: 3 INVALID_ARGUMENT: Request contains an invalid argument. #10

Closed davidvc closed 3 years ago

davidvc commented 3 years ago

I get this error regardless of what speech text I send:

const actionsTestManager = new ActionsOnGoogleTestManager({
  projectId: "venus-c8f37",
});
actionsTestManager.setSuiteLocale("en-US");
actionsTestManager.setSuiteSurface(DEFAULT_SURFACE);
...
await actionsTestManager.sendQuery("Talk to Venus Beta"); 

That last call fails with this error:

       Error: sendInteraction API call failed: Error: 3 INVALID_ARGUMENT: Request contains an invalid argument.
           at ActionsApiHelper.sendInteraction (/Users/dvc/venus/venus-google-action/node_modules/@assistant/conversation-testing/dist/actions-api-helper.js:47:19)
           at async ActionsOnGoogleTestManager.sendInteraction (/Users/dvc/venus/venus-google-action/node_modules/@assistant/conversation-testing/dist/action-on-google-test-manager.js:79:31)
           at async VenusWorld.<anonymous> (/Users/dvc/venus/venus-google-action/test/acceptance/features/support/hooks.js:30:3)
davidvc commented 3 years ago

I tried using your skeleton-test as a known working example. If I keep the writePreviewFromDraft line it times out.

I get a different error once I remove that:

AssertionError: Unexpected issue: Failed to find intent name in the response {"output":{"speech":[],"text":"Alright. Getting the test version of Venus Beta.Sorry, Venus Beta isn't supported in this region.","canvas":null,"actionsBuilderPrompt":null},"diagnostics":{"actionsBuilderEvents":[]},"conversationToken":"EqQES2g5ek5FaHVOVE10VGs5cmQyTlJRWGQyUm5CTWNXSkNaSGcwV2tOa2FIaGpPS1AxZ29NR1loODBPRkZYVFdSbVVWTTJaMlE0VFdWTlgwZzNVbTFhZDI4MGNFTmthSGhqZWswS0tnZ0RFaVl6WkRKak1XTm1PQzAyTURJekxUTmxZVFl0WVRjNFppMWtOV1E1WW1ZMFpHSmhNakFyTVJJZk5EaFJWMDFrWmxGVE5tZGtPRTFsVFY5SU4xSnRXbmR2TkhCRFpHaDRZM28zQ2hRSUFSSVFNREF3TURBd05HRXlOelppT0dRMU1oSWZjelJJYmpVekxVNVBhM2RqVVVGM2RrWndUSEZpUW1SNE5GcERaR2g0WTRJQnJ3RXlNVEk5ZEU4M1QyWjJORkJIYWpsS1dGVTBWMnR3VmtaWVFqaG5XVkpGV0ZkdFpFOVhVRWxmYVRZNVVsZHpWRmg0VEd0TE5YUnZkbTQwUjAxT1V6WnBhbmx6Y0RoclRrTm5ZalZOTnpONmVrWmtORlZUWlROVlVqVk5SM0JFWlRkdVlVTXdaREkwU2xSRlYyTk5ibFZTUlRCbFNsaG9iekZEUVdwVmIwNHhOM0pZV0U5M2RVTmtYMUJmTkZoZlMwaERZV0k0YnpOdGRIVXpRVVZsZFdSMGRURkNiWFZGUnpoMU1XTlJhVUUwaWdFVkVoTUlnOERkdnJfVDd3SVY2d2swQ0IzQzZ3NjkaJ3NpbXVsYXRvcl9kZXZpY2VfRDc1MzRDRDlFRTQwNTEzMF8wMDAwMA=="}: expected null to exist
    at ActionsOnGoogleTestManager.getIntent (node_modules/@assistant/conversation-testing/dist/action-on-google-test-manager.js:468:136)
    at ActionsOnGoogleTestManager.assertIntent (node_modules/@assistant/conversation-testing/dist/action-on-google-test-manager.js:180:33)
    at Context.<anonymous> (test/integration/simple_action_test.js:49:10)
LuizPiresS commented 3 years ago

We were asking for authorization to get the username from the Google account. At first, we chose to disable the use of the user name. We did this so that we were able to deliver the POC on time.

Fleker commented 3 years ago

Looks like the error may be getting

"canvas":null,"actionsBuilderPrompt":null" in your response.

Seems like there's a secondary issue:

"Alright. Getting the test version of Venus Beta.Sorry, Venus Beta isn't supported in this region."

davidvc commented 3 years ago

I can't even remember how I fixed this, but it's working now. Thanks @Fleker !