FlowiseAI / FlowiseChatEmbed

334 stars 1.35k forks source link

Flowise Error: Expected content-type to be text/event-stream, Actual: application/json; charset=utf-8 #249

Open j-d-carmichael opened 2 months ago

j-d-carmichael commented 2 months ago

flowise: latest embed code: suggested from flowise

I am having the exact same issue as https://stackoverflow.com/questions/79005072/flowise-error-expected-content-type-to-be-text-event-stream-actual-applicatio

This results in the embedded js code saying: Flowise Error: Expected content-type to be text/event-stream, Actual: application/json; charset=utf-8

The same agent works fine within the "designer canvas", but we also note that in the flowise designer a socket connection is established where as with the embed code there is no socket established.

Any ideas?

Nadiahadjmbarek commented 2 months ago

same issue, my website is hosted on wordpress

nikitas-novatix commented 2 months ago

I have exactly the same issue, please work fast on this

Panconjugo23 commented 2 months ago

Hey guys, I am the one who created the stackoverflow above. After researching for some hours I found out that the latest versions 2.0.1 and 2.0.0 are the ones not working, so in case your are copying and pasting the embedding script add the version 1.3.14

import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed@1.3.14/dist/web.js

I didn't research further to understand why the latest versions are not working so in case someone knows the real issue please share it.

blissiraDC commented 2 months ago

So its to do with the new SSE streaming not working with this new FlowiseEmbed version? Was hoping the day had come where we could finally see responses streamed!

croftie commented 2 months ago

Same here

mkmatzat commented 2 months ago

Same problem here. The tip from @Panconjugo23 helped, many thanks! I will put the working web.js on my own server to avoid surprises in future.

xbiggyl commented 1 month ago

This is still not fixed. I'm having the same problem on a wordpress website + nginx

Manually adding the version number as @Panconjugo23 mentioned is still the only solution.

ShaneMuir commented 1 month ago

Same here version 2.0.6 no likely

web.js:1 EventSource Error:  Error
    at onopen (web.js:1:931822)
    at A (web.js:1:923895)
ShaneMuir commented 1 month ago

Same here version 2.0.6 no likely

web.js:1 EventSource Error:  Error
    at onopen (web.js:1:931822)
    at A (web.js:1:923895)

UPDATE - I was running an old version of flowise on the backend so updating that has resolved my issue.

https://github.com/FlowiseAI/Flowise

kh0r commented 2 weeks ago

I found a fix for this: #274

kh0r commented 2 weeks ago

FYI, version 2.0.1 doesn't seem to have this problem.