mirror of
https://github.com/mthenw/frontail.git
synced 2026-04-26 10:15:52 +03:00
[GH-ISSUE #222] WebSocket connection fails with Error 400 #149
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/frontail#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RogerG007 on GitHub (Jan 6, 2021).
Original GitHub issue: https://github.com/mthenw/frontail/issues/222
The newest openhabian release causes Frontail 4.9.1 to not being able to display any logs. On web console the fault message can be seen:
index.js:83 WebSocket connection to 'ws://192.168.0.51:9001/socket.io/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400As a workaround, editing web/index.html and changing
transports: ['websocket']totransports: ['polling']makes it workable again or alternatively, downgrading to 4.9.0.Any idea what the real cause could be for this error message?
@bwiessneth commented on GitHub (Jan 6, 2021):
Hi @mthenw,
with Socket.IO 2.4 the default CORS behavior changed, which breaks functionality for RogerG007's and openhabians's (a tailored raspberry distro for running openhab) use-case.
IMHO pinning the Socket.IO version to 2.3 or adding the CORS change should resolve this issue.
https://github.com/socketio/socket.io/issues/3740
https://socket.io/blog/socket-io-2-4-0/
@mthenw commented on GitHub (Jan 8, 2021):
@bwiessneth do you mind creating a PR?
@bwiessneth commented on GitHub (Jan 8, 2021):
I was about to start on this when I saw that this (breaking) change was reverted with socket.io 2.4.1 (https://github.com/socketio/socket.io/releases/tag/2.4.1).
As long as the socket.io version string in pacakage.json stays like it is now, there should be no future issue with CORS / socket.io
@casperklein commented on GitHub (Feb 5, 2021):
My setup broke today and I guess my issue is related to this one. I was bravely using the
latesttag of the docker image (which was rebuild yesterday). Afaik the only change was this:github.com/mthenw/frontail@38022f7a0a.I am now using the 4.9.1 tag instead of latest and my setup is working again.
@CSchlipp commented on GitHub (Feb 8, 2021):
@mthenw: If no changes are required, would you simply update the docker image on docker hub with the latest node_modules?
The latest tag is unfortunately still referring to a non-working image...
Thanks!
@mthenw commented on GitHub (Feb 17, 2021):
Should be fixed in 4.9.2.