I try to test my google assistant application but the console.action simulator can't reach my web server while the "dialogflow simulator" can (Dialogflow simulator screenshot). I don't get any request from it in my ngrok console. When I write in the simulator "Talk to my test app", I get the following error:
We're sorry, but something went wrong. Please try again.
.
{
"response": "We're sorry, but something went wrong. Please try again.",
"expectUserResponse": false,
"conversationToken": "",
"audioResponse": "",
"ssmlMarkList": [],
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Sorry, this action is not available in simulation"
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 8,
"is3pResponse": false,
"clientOperationList": [],
"projectName": "",
"renderedHtml": "",
"previewStartTimeMicros": "",
"isEmptyResponse": false,
"agentName": "",
"servingModelOutdated": false
}
All the solutions I tried:
- I enabled web & App activity on my personnal account (App activity screenshot).
- I enabled logs and applied the query "resource.type="global"" but no log appears (except those resulting from the tests carried out with dialogflow).
- I have manually modified the webhook address of the simulator. Webhook simulator screenshot
- I deleted my project several times and recreated it.
- I tried to invoke the wizard on my phone.
- I tried ngrok and localtunnel
- On dialogflow, I went to settings => Share and added a new user as Developper (a child account of my main google account). I then went to the IAM console and gave him the following rights: "Dialogflow API Client", "Reader". I accessed the simulator with this account via another browser but the error persists. (Source)
- I activated/desactivated the webhook for the intent "Default Welcome Intent".
- I changed the language and the localization of the simulator by those which I had informed during the creation of the project (Simulator location screenshot).
Here is a extract of my code:
const {
dialogflow,
actionssdk,
Image,
Table,
Carousel,
List,
} = require('actions-on-google');
const express = require('express');
const bodyParser = require('body-parser');
const app = dialogflow({
debug: false
});
app.intent('Default Welcome Intent', (conv, params) => {
conv.ask(`Salut mec ca va ?`);
});
app.catch((conv, error) => {
console.error(error);
conv.ask(`J'ai rencontré un problème, pouvez-vous répéter ?`);
});
app.fallback((conv) => {
conv.ask(`Je n'ai pas compris. Pouvez-vous répéter ?`);
});
express().use(bodyParser.json(), app).listen(3000);