Comments (20)
@atulep could you assist? thanks
from assistant-actions-nodejs.
@mishushakov I have the same problem. Do you have any progress there?
from assistant-actions-nodejs.
@ujja nope 😞
from assistant-actions-nodejs.
@mishushakov I have just a very basic action. I did not publish it.
I called just the writePreview endpoint (which fails now with internal error, but last week was working), then tried the sendInteraction endpoint.
I suppose now that there is some missing magical property/setting. Is yours published?
from assistant-actions-nodejs.
my action is not published
i don't know what causes the error and there is no explanation anywhere to be found on the internet
from assistant-actions-nodejs.
Hello @mishushakov, I apologize for a late reply here. It's not clear to me what's wrong yet. Typically, 400 error messages contain some useful info in details
, which is how I usually debug. Is there a way you can inspect a response
object?
from assistant-actions-nodejs.
full response body from auth.client
{
"response":{
"config":{
"url":"https://actions.googleapis.com/v2/projects/action-builder-test-40291:sendInteraction",
"method":"POST",
"data":{
"input":{
"query":"Talk to Action builder test",
"type":"KEYBOARD"
},
"deviceProperties":{
"surface":"PHONE",
"location":{
"coordinates":{
"latitude":-90,
"longitude":-90
},
"formattedAddress":"1600 Amphitheatre Pkwy, Mountain View, CA 94043",
"zipCode":"94043",
"city":"Mountain View"
},
"locale":"en",
"timeZone":"America/New_York"
},
"conversationToken":"test"
},
"headers":{
"Authorization":"Bearer ya29.c.KqAB_gcwDaaI8ZOg9Xcf_uYVjTaRaCXYYBIZpkxRIHmDPY36vQzeIn1T8w8WQzk33RFQc7J1NGru8GCUkYp86b44YjImPY2AydaVjCxbpbV6DZqRHJht47Vwu_BGVBxXjAxU6zPRspJlLkfqRauKYr_HE3aqaGtFJutl7U_NaoQpIR476Wel04862oaakiA3GRhwW-CaZzGCJECUgqMURH9OvA",
"User-Agent":"google-api-nodejs-client/7.0.4",
"x-goog-api-client":"gl-node/14.15.5 auth/7.0.4",
"Content-Type":"application/json",
"Accept":"application/json"
},
"body":"{\"input\":{\"query\":\"Talk to Action builder test\",\"type\":\"KEYBOARD\"},\"deviceProperties\":{\"surface\":\"PHONE\",\"location\":{\"coordinates\":{\"latitude\":-90,\"longitude\":-90},\"formattedAddress\":\"1600 Amphitheatre Pkwy, Mountain View, CA 94043\",\"zipCode\":\"94043\",\"city\":\"Mountain View\"},\"locale\":\"en\",\"timeZone\":\"America/New_York\"},\"conversationToken\":\"test\"}",
"responseType":"json"
},
"data":{
"error":{
"code":400,
"message":"Interaction did not trigger the preview of an action.",
"errors":[
{
"message":"Interaction did not trigger the preview of an action.",
"domain":"global",
"reason":"badRequest"
}
],
"status":"INVALID_ARGUMENT"
}
},
"headers":{
"alt-svc":"h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"",
"cache-control":"private",
"connection":"close",
"content-encoding":"gzip",
"content-type":"application/json; charset=UTF-8",
"date":"Tue, 11 May 2021 10:11:20 GMT",
"server":"ESF",
"transfer-encoding":"chunked",
"vary":"Origin, X-Origin, Referer",
"x-content-type-options":"nosniff",
"x-frame-options":"SAMEORIGIN",
"x-xss-protection":"0"
},
"status":400,
"statusText":"Bad Request",
"request":{
"responseURL":"https://actions.googleapis.com/v2/projects/action-builder-test-40291:sendInteraction"
}
},
"config":{
"url":"https://actions.googleapis.com/v2/projects/action-builder-test-40291:sendInteraction",
"method":"POST",
"data":{
"input":{
"query":"Talk to Action builder test",
"type":"KEYBOARD"
},
"deviceProperties":{
"surface":"PHONE",
"location":{
"coordinates":{
"latitude":-90,
"longitude":-90
},
"formattedAddress":"1600 Amphitheatre Pkwy, Mountain View, CA 94043",
"zipCode":"94043",
"city":"Mountain View"
},
"locale":"en",
"timeZone":"America/New_York"
},
"conversationToken":"test"
},
"headers":{
"Authorization":"Bearer ya29.c.KqAB_gcwDaaI8ZOg9Xcf_uYVjTaRaCXYYBIZpkxRIHmDPY36vQzeIn1T8w8WQzk33RFQc7J1NGru8GCUkYp86b44YjImPY2AydaVjCxbpbV6DZqRHJht47Vwu_BGVBxXjAxU6zPRspJlLkfqRauKYr_HE3aqaGtFJutl7U_NaoQpIR476Wel04862oaakiA3GRhwW-CaZzGCJECUgqMURH9OvA",
"User-Agent":"google-api-nodejs-client/7.0.4",
"x-goog-api-client":"gl-node/14.15.5 auth/7.0.4",
"Content-Type":"application/json",
"Accept":"application/json"
},
"body":"{\"input\":{\"query\":\"Talk to Action builder test\",\"type\":\"KEYBOARD\"},\"deviceProperties\":{\"surface\":\"PHONE\",\"location\":{\"coordinates\":{\"latitude\":-90,\"longitude\":-90},\"formattedAddress\":\"1600 Amphitheatre Pkwy, Mountain View, CA 94043\",\"zipCode\":\"94043\",\"city\":\"Mountain View\"},\"locale\":\"en\",\"timeZone\":\"America/New_York\"},\"conversationToken\":\"test\"}",
"responseType":"json"
},
"code":400,
"errors":[
{
"message":"Interaction did not trigger the preview of an action.",
"domain":"global",
"reason":"badRequest"
}
]
}
from assistant-actions-nodejs.
is there anything i'd need to do on the actions side?
from assistant-actions-nodejs.
{
"code": 3,
"details": "Interaction did not trigger the preview of an action.",
"metadata": {
"internalRepr": {},
"options": {}
}
}
from assistant-actions-nodejs.
I have created more projects with dialogflow, and with actions sdk.
Has tried with my company account and with my private one. Everyone failed with the same result.
Maybe it is possible to reproduce it on a new project (I have used Conversation Components sample).
from assistant-actions-nodejs.
It appears to be the reference docs are missing one field in the SendInteractionRequest
: project
. It should be a string
in the following format: projects/{projectId}
. Can you include that in your request and try again?
We'll update the reference. However, I'd also recommend checkout out googleapis repo as it contains Actions API protos and is updated automatically when we make public facing changes. For example, the project
field is listed there.
I was only able to figure this out by looking at server logs, so I'll see if we can improve the error message in the API response.
from assistant-actions-nodejs.
hey,
i have added project
field to my SendInteractionRequest
, but i still get the same error
from assistant-actions-nodejs.
@mishushakov, I apologize for delayed reply here - I'm just coming back from vacation.
Did you call WritePreview endpoint before invoking SendInteraction
?
from assistant-actions-nodejs.
hey, i didn't call WritePreview
from assistant-actions-nodejs.
Can you try that? Calling WritePreview
is a prerequisite for calling SendInteraction
.
from assistant-actions-nodejs.
sorry, can i call WritePreview
method from the actions console?
docs didn't mention it was a prerequisite for SendInteraction
...
from assistant-actions-nodejs.
I don't think you can call it from the Console. You should use WritePreview
in your code. The README in this repo shows some sample code - https://github.com/actions-on-google/assistant-actions-nodejs#using-the-client-library.
from assistant-actions-nodejs.
thanks a lot, i tried a bit harder this time and was finally able to trigger my action!
thanks for all your support 👍
from assistant-actions-nodejs.
@mishushakov What did you changed?
from assistant-actions-nodejs.
@ujja i have called WritePreview
in my code, after that i was able to trigger the interaction
from assistant-actions-nodejs.
Related Issues (6)
- "Request contains an invalid argument" error from sendInteraction HOT 1
- Firebase Terms of Service is not accepted. Navigate to your project's overview page on the Actions Console to accept the Terms of Service. HOT 5
- Error "Interaction did not trigger the preview of an action" but sendInteraction() is called
- how to initialise ActionsSdkClient() with access_token HOT 1
- List item fields missing from response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assistant-actions-nodejs.