Skip to content

[BUG] Error with websockets #2290

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

Open
acardona opened this issue Feb 25, 2025 · 2 comments
Open

[BUG] Error with websockets #2290

acardona opened this issue Feb 25, 2025 · 2 comments

Comments

@acardona
Copy link
Contributor

The first stack viewer opens fine, but when opening a second one for e.g., a XZ view in the Octo volume, we get a black canvas and the error:

catmaid.964ae4df2124.js:5284 WebSocket connection to 'wss://neurophyla.mrc-lmb.cam.ac.uk/catmaid/fibsem/channels/updates/' failed: Error during WebSocket handshake: Unexpected response code: 404
Client.refreshBackChannel @ catmaid.964ae4df2124.js:5284
catmaid.964ae4df2124.js:5294 There was an error establishing WebSockets connections. Falling back to long polling.
@tomka
Copy link
Contributor

tomka commented Feb 25, 2025

This likely has nothing to do with the web socket error (I assume it's shown in the console?). I will have a look at what's going on.

tomka added a commit that referenced this issue Feb 25, 2025
This was accidentally broken when improving loading times for stacks by
hiding them in some circumstances before a final redraw happens.

Fixes #2290
tomka added a commit that referenced this issue Feb 25, 2025
Not noticing bind() here caused issued #2290. To avoid
something similar in the future, arrow functions are now used. This
makes the handler readable and doesn't "magically" add parameters. The
additional closure isn't a problem.
@tomka
Copy link
Contributor

tomka commented Feb 25, 2025

This is fixed now in dev. I introduced this bug recently accidentally when adding an additional parameter to a function used for opening stacks. This function is used by the UI directly as click handler in the menu using bind(). As a consequence additional wrong parameters were passed down to this function. I fixed this by adding the new parameter explicitly and replaced bind() with arrow functions.

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

No branches or pull requests

2 participants