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

add 'reconnect' setting and patch noVNC to fix issue after browser tab has been idle. #8

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

remcoros
Copy link
Owner

@remcoros remcoros commented Oct 4, 2024

explanation for reviewers:

The behavior of an idle tab has not changed by default. After being idle (for about 20 min.), kasm disconnects and shows a blue background.

But instead of running into a javascript error, it now correctly opens the kasm control bar, that allows to reconnect to the session (using the 'Connect' button):

image

this is still the default behavior (and preferred, so that a 'forgotten' tab does not eat resources for too long).

I've added an option "Automically reconnect", that makes use of the "reconnect" feature of kasm/noVNC. This automically reconnects to the session when it's closed either unexpected, or after idling for too long.

Technicals:

The main issue (kasm disconnects after a while, rendering a blue screen and the error Uncaught TypeError: Cannot read properties of undefined) is fixed by clearing the timer interval that kasm added when a disconnect happens. (this timer interval accesses "UI.rfb", but that is set to undefined when disconnected and causes a javascript error).

We clear the timer now, so that this error does not occur, and the intended logic of kasm/noVNC runs. (show a "disconnected message" and move the status to "disconnected" so that the kasm control bar opens)

Also added 'noVNC_hidden' css class to the reconnect options in kasm control bar, as this is now controlled from StartOS.

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

Successfully merging this pull request may close these issues.

1 participant