I am receiving this response from my Google Action and I am unable to figure out why an empty response would be sent out. My Intents all seem to have the right webhooks and default responses where needed.
{
insertId: "hrf6g3f6f1zhg"
labels: {
channel: "production"
querystream: "GOOGLE_USER"
source: "AOG_REQUEST_RESPONSE"
}
logName: "projects/math-164823/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2018-08-01T13:05:42.164452044Z"
resource: {
labels: {
action_id: "assistant.intent.action.TEXT"
project_id: "math-164823"
version_id: ""
}
type: "assistant_action"
}
severity: "DEBUG"
textPayload: "Received response from agent with body: HTTP/1.1 200 OK
Server: nginx/1.13.6
Date: Wed, 01 Aug 2018 13:05:42 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 494
X-Cloud-Trace-Context: f0727cf8856a9fa6cbf1f0e861c14836/7685757289520895586;o=0
Google-Assistant-API-Version: v1
Assistant-Interaction-Error-Code: -1
Assistant-Interaction-Error-Message: Failed to parse Dialogflow response into AppResponse because of Empty speech response
Via: 1.1 google
Alt-Svc: clear
{
"responseMetadata": {
"status": {
"code": 10,
"message": "Failed to parse Dialogflow response into AppResponse because of Empty speech response",
"details": [{
"#type": "type.googleapis.com/google.protobuf.Value",
"value": "{\"id\":\"c132e91a-4918-4720-ae54-8deacd5bd59e\",\"timestamp\":\"2018-08-01T13:05:41.908Z\",\"lang\":\"en\",\"result\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1533128627128\"}"
}]
}
}
}."
timestamp: "2018-08-01T13:05:42.106660479Z"
trace: "projects/368086278893/traces/1533128627128"
}
It is very difficult to diagnose the problem without seeing all of your Intents and the code you are using in your fulfillment, but a few things to look for in this case:
Make sure your Intents either have a Response set in the response section, or the switch saying to use a fulfillment webhook is turned on.
Make sure your Intents all have a function in the webhook that is supposed to return something.
If you are making asynchronous calls (such as calls to APIs that run on other servers), make sure you are using Promises and that you are returning a Promise as part of your intent handler.
Check the logs for your webhook. Make sure there are no errors logged when it runs. If necessary, add logging to make sure you're returning what you think you're returning.
You may wish to run your webhook with a proxy, such as ngrok, in between so you can get detailed request and response logs and see the exact JSON that your code is sending back.
Turn on Dialogflow's feature to log to Google Cloud's StackDriver.
Try and enable V2 for Google Assistant in Dialogflow integration. If your Dialogflow agent is Old while integrating enable as per the below-highlighted section.
If this is not working, update your question with Dialogflow intents, Settings, Webhook code and version of the client.
Related
I make a post request using axios in my React App and it returns expected value but translated to English.
Is there any explanation for this behavior?
I tried to send request using Postman and the response message is in the original language (Indonesian):
{
"status": 0,
"message": "Pastikan otp anda benar",
"data": {}
}
On my React App and if I inspect on the network the response message is translated to English:
{
"status": 0,
"message": "Make sure your otp is correct",
"data": {}
}
Here is the response from Postman:
Original Response
Here is the response on browser's network (and being rendered on the app):
On Browser's Response
Please help if anyone understands why this is happening and what I can try to fix and to understand it.
Thank you.
It's probably your browsers devtools. Try inspecting network in another browser to confirm this.
I'm trying to submit an application for a verification through the Google Console as it has opened from today.
I have verified the domain in question through Goofle Search Console, I have ensured that all the links are set(Policy, Terms of Usage etc), filled the form with information and explanation about the scopes rhat requires verification.
When I submit the form I get no response that it's submited but the response from Network in Developer tools I see it's 400 HTTP Status and I see the following error message:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
I have double checked my steps but still not able to resolve this, any information that you can provide would be great.
Adding Request:
https://clientauthconfig.clients6.google.com/v1/brands/ID/submitReview?alt=json&key=AIzaSysnipsnip0DjtiCwWBwQ1djDy741g
Above request is PUT, here is the body content
{"brandId":"ID","scopeRationale":"","additionalInfo":"","contactEmail":"contactmeialaddress#gmail.com","pendingScopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.insert","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/contacts.readonly"],"category":[1,3,5],"scopeDetails":[{"apiGroup":1,"pendingScopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.insert","https://www.googleapis.com/auth/gmail.readonly"],"scopeRationale":"Why we need access to this scope."},{"apiGroup":2,"pendingScopes":["https://www.googleapis.com/auth/contacts.readonly"],"scopeRationale":"Additional info why we need this."}]}
I want to know whether IBM Watson Assistant has the feature of calling webhook.
It means when an intent of workspace is matched Watson Assistant need to send a post request to an external server including the intent in the request body.
Example for a webhook:
https://123.456.789.12:7788/myWebhook/testMethod
IBM Watson Assistant need to send a Post request to this service and that service will return a text string. Watson Assistant should get that text and show it to the user.
That is my usecase. Will it work with Watson Assistant?
i found the below documentation from IBM site.
https://console.bluemix.net/docs/services/conversation/dialog-actions.html
It says to update the json response. i.e. add another key value pair to json object as "action". in the action json array there is "name" parameter. I added above url to name parameter and checked by calling the intent whether a request comes to my web service but it didn't.
following is my json response. i assumed once the intent is matched a post request should go to my web service. but i checked my web service by printing the request body on the console. but no any request came to it. could you please tell me where did i miss?
{
"context": {
"skip_user_input": true
},
"output": {
"text": {
"values": [
"your current outstanding balance is $my_balance ."
],
"selection_policy": "sequential"
}
},
"actions": [
{
"name": "https://123.456.789.12:7788/myWebhook/testMethod",
"type": "client",
"parameters": {
"body": "$body"
},
"result_variable": "context.my_balance"
}
]
}
You found the correct method, i.e. dialog actions, to implement webhooks.
Watson Assistant supports server- or client-side actions:
For the server-side action you would set up an action with IBM Cloud Functions. That action would call the webhook.
For client side, you would pass the information similar to what you show in the question to the app (client). Your app would need to react and to call the webhook.
From what I read about your case I recommend checking out the server-side action. This tutorial about a database-driven bot implements a couple of those actions. Instead of calling the database, you would call out the webhook.
As of August 2019, there is now an integrated webhook feature in Watson Assistant.
Go to "Options" in the Assistant dialog and enable webhook. Paste the url you got after creating an action from cloud functions. Don't forget to add ".json" to the url you paste in the assistant webhook page. See more information here:
https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-webhooks
I set developed my own site that sells items with a shopping cart. When items are selected, a call is made to paypal's api to create a payment request, then to complete the payment. Seems to work fine with sandbox mode, but with live setting I get the following response :
{ [Error: Response Status : 400]
response:
{ name: 'VALIDATION_ERROR',
details: [ [Object] ],
message: 'Invalid request - see details',
information_link: 'https://developer.paypal.com/docs/api/#VALIDATION_ERROR',
debug_id: 'f8dbb7c22fdf2',
httpStatusCode: 400 },
httpStatusCode: 400 }
I was wondering if someone out who has worked with paypal's api to give me some advice.
Thanks!
I've got the Webhooks working for our developer accounts, and it emits a status_changed message every time there is an Uber request, even if the request was not initiated from our app (using the "all_trips" permission)
When we get the response back, how do we determine which user this is for? E.g. in the response below, there is no way to determine that and using the server token to authenticate to the resource_href gives an "Invalid OAuth 2.0 credentials provided" error.
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0777",
"event_time": 1427343990,
"event_type": "all_trips.status_changed",
"meta": {
"resource_id": "2a2f3da4",
"resource_type": "request",
"status": "accepted"
},
"resource_href": "https://api.uber.com/v1/requests/2a2f3da4"
}
Thanks for catching this! We rolled out a fix that adds the users UUID as an additional field in the "meta" section, as well as updated our documentation here: https://developer.uber.com/docs/webhooks
Let us know if you have any more trouble!