mishushakov / dialogflow-web-v2

Dialogflow Web Integration. Supports rich components
https://mishushakov.github.io/dialogflow-web-v2/
GNU General Public License v3.0
419 stars 135 forks source link

Missing avatars and responses #24

Closed WimStienstra closed 4 years ago

WimStienstra commented 4 years ago

Hello,

I am trying to integrate my dialogflow bot into our website by using one of your applications, but I am running into different problems.

• I am getting double responses. • The bot’s logo is not showing up. • Lastly it takes enormously long to get a response and sometimes doesn’t get any response.

I hope you can help me fix these problems or maybe you know what can cause these.

To be clear I tried the df-btn script, dialogflow-web-v2 and the source: https://jipsnel-assistant.ui.dialogflow.cloud.ushakov.co/ (It is a dutch bot tho, so that might give a problem for you to test it?)

mishushakov commented 4 years ago

Hey, i'm here to help

  1. Play around with "Platform" setting in Dialogflow Gateway Dashboard
  2. I know. Quick fix may be, to change
<img v-if="app.avatarUri" class="app-icon" :alt="app.displayName" :src="app.avatarUri”>

to:

<img v-if="app.avatarUri" class="app-icon" :alt="app.displayName" :src="'https://storage.googleapis.com/cloudprod-apiai/‘ + app.avatarUri">

in src/Components/Partials/TopHead.vue

  1. Haven't heard of that one yet. Which browser and OS are you using?

Thanks

WimStienstra commented 4 years ago

Hello,

Yea the first 2 problems got fixed. Thx, could the icon fix be added as default or?

I am using Windows 10 with Chrome. The response time has been reduced with the 1 response.

edit: the response still sometimes takes too long that it looked like it crashed.

alasdair-at-flasher commented 4 years ago

I'm seeing issue 3 too. I'm also using Windows 10 with Chrome.

It's like the input is never sent, though the empty speech bubbles blink.

Firebase logs - I'm using internal webhook for fulfillment - show the request was never received.

If I send another question or repeat the initial one, it comes back to life.

I also get frequent "Aw snap" errors from Chrome reutrning cards with images, though thismay be due to the image size.

Is there any logging available while running npm run serve?

mishushakov commented 4 years ago

Yeah, let's see what i can do. I could maybe add an option to Dialogflow Gateway, that disables the Realtime backend, the clients will fallback to HTTP instead

mishushakov commented 4 years ago

Added the avatars issue to Google's Issue Tracker: https://issuetracker.google.com/issues/147386023

mishushakov commented 4 years ago

Avatars fixed, missing responses in progress...

mishushakov commented 4 years ago

Temporary fix is to terminate WSS connection on the Client paste this in the created() in App.vue:

this.client.wss_connection = null

Example on RunKit:

Screenshot 2020-01-27 at 13 01 25
mishushakov commented 4 years ago

Ok, i've fixed connection problems, in future versions, Realtime API will be optional, Enterprise Edition also has functionality to disable it server-side

thanks