codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

Unable to connect to Dialogflow #270

Closed ugaleshama closed 5 years ago

ugaleshama commented 5 years ago

Hi,

I am getting the below error, i tried through both BotiumBox and "botium-cli emulator" command

Error: Cannot send message to dialogflow container: { Error: 7 PERMISSION_DENIED: IAM permission 'dialogflow.sessions.detectIntent' on 'projects/temperatureconvertersamp-efdbf/agent' denied. at Object.exports.createStatusError (/usr/local/lib/node_modules/botium-box/server/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/usr/local/lib/node_modules/botium-box/server/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/usr/local/lib/node_modules/botium-box/server/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/usr/local/lib/node_modules/botium-box/server/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/usr/local/lib/node_modules/botium-box/server/node_modules/grpc/src/client_interceptors.js:845:24) code: 7, metadata: Metadata { _internal_repr: { 'grpc-server-stats-bin': [Array] } }, details: 'IAM permission \'dialogflow.sessions.detectIntent\' on \'projects/temperatureconvertersamp-efdbf/agent\' denied.' }

I have created the dialogflow agent and created the service accounts with the admin role and added the details to the botium.json file

can anyone tell me if i am missing any step?

codeforequity-at commented 5 years ago

Did you follow the steps for retrieving the credentials described here https://chatbotsmagazine.com/3-steps-setup-automated-testing-for-google-assistant-and-dialogflow-de42937e57c6 ?

ugaleshama commented 5 years ago

yes. i did follow the steps that link itself.

The only change is that i used the "temperature trivia" bot from the Dialogflow samples from https://dialogflow.com/docs/samples

And created a service account, agave admin role as described by the link you pointed to and tried connecting.

Is there any missing step?

ujja commented 5 years ago

Hello,

If I dont assign the Dialogflow API Admin role (see in https://chatbotsmagazine.com/3-steps-setup-automated-testing-for-google-assistant-and-dialogflow-de42937e57c6) got this error.

Did you do set it?

I was not able to modify the account, and add later. Had to create a new one.

You can set it on the second page of the wizard.

ugaleshama commented 5 years ago

yes. I have assigned the admin role but still got this issue.

ujja commented 5 years ago

Hmm, dont know what this is.

There is an issue for this problem, but i did not find more info there.

ujja commented 5 years ago

No activity, issue is related to Amazon, not to Botium.