When I followed this tutorial: https://blog.jscrambler.com/build-a-chatbot-with-dialogflow-and-react-native/ I'm having an error within the handleGoogleResponse() method as result.queryResult is undefined. If I send a message as a user, there is no response collected from Dialogflow and presented back to the user.
What does this line of code mean in the handleGoogleResponse() method?
let text = result.queryResult.fulfillmentMessages[0].text.text[0];
What is result.queryResult? What do I do since result.queryResult is undefined?
I noticed that once I open the chatbot screen my console shows: "generating jwt for "Object {\n "email": "integrate-dialogflow@mt-bot-wkgm.iam.gserviceaccount.com",\n "key": ....." with the key information for my service account. This means it is able to read my env.js file?
Edit:
console.log(result) returns [object Object]
console.log(result.responseID) returns undefined
console.log(result.queryResult) returns undefined
console.log(result.webhookStatus) returns undefined
console.log(result.outputAudio) returns undefined
console.log(result.outputAudioConfig) returns undefined
console.log(JSON.stringify(result)) returns
{"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}