Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
j-d-carmichael opened this issue Sep 20, 2024 · 11 comments

Comments

@j-d-carmichael
Copy link

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

  • We have flowise protected behind and nginx proxy.
  • Everything works fine except the embedded chatbots don't fully function... they load just fine, but it sends a request to know if it should stream or not.. it returns streaming: true.
  • When sending the question to the server, streaming: true is sent in the payload but the response from the server, is application/json

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
Copy link

Nadiahadjmbarek commented Sep 20, 2024

same issue, my website is hosted on wordpress

@nikitas-novatix
Copy link

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

@Panconjugo23
Copy link

Panconjugo23 commented Sep 20, 2024

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/[email protected]/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
Copy link

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
Copy link

croftie commented Sep 23, 2024

Same here

@mkmatzat
Copy link

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
Copy link

xbiggyl commented Oct 7, 2024

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
Copy link

ShaneMuir commented Oct 31, 2024

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
Copy link

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
Copy link
Contributor

kh0r commented Nov 13, 2024

I found a fix for this: #274

@kh0r
Copy link
Contributor

kh0r commented Nov 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants