Skip to content
New issue

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

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

Already on GitHub? # to your account

EventSource's response has a MIME type ("text/html") that is not "text/event-stream". #60

Open
dkaukov opened this issue Aug 18, 2024 · 3 comments

Comments

@dkaukov
Copy link

dkaukov commented Aug 18, 2024

Hi, after forking template and bulding it with default settings. Im getting lot of

Attempting SSE connection.
demo/:1 EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.

It seems like /events endpoint responds with default html:
image

Any pointers where to dig?

@theelims
Copy link
Owner

This seems to be browser specific. It works on Firefox. Might be the naming "EventSource" is problematic and it mistakes it with the build in event source which uses server sent events instead of websocket.

You could try renaming the svelte EventSource into something different.

I'll look into that later today.

@dkaukov
Copy link
Author

dkaukov commented Aug 19, 2024

Yeah, the request from Chrome, seems missing:

Sec-WebSocket-Version: 13
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: xy4LT/rAJ+VJ+D1LIAgGgQ==
Connection: keep-alive, Upgrade
Upgrade: websocket

@atassumer
Copy link

it's try to connect websocket connection to /events, but it must be /ws/events, delete www* .h file and build interface

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

No branches or pull requests

3 participants