Bug 5651 - Error when disconnecting from Web Access on Firefox
Summary: Error when disconnecting from Web Access on Firefox
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.11.0
Assignee: Niko Lehto
URL:
Keywords: prosaic
Depends on:
Blocks:
 
Reported: 2015-09-23 17:12 CEST by Samuel Mannehed
Modified: 2019-11-06 14:14 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments
Screenshot of the error (54.13 KB, image/png)
2016-10-07 16:58 CEST, Samuel Mannehed
Details
Screenshot of the error (68.18 KB, image/png)
2017-04-20 11:23 CEST, Samuel Mannehed
Details

Description Samuel Mannehed cendio 2015-09-23 17:12:39 CEST
Half the time when logging out from a ThinLinc session open in the HTML5 client we get the following error:

NS_ERROR_NOT_CONNECTED



Issue found on Firefox 38 on Fedora 20. It does not happen everytime I log out, could be some sort of race?
Can not reproduce in Firefox 38 on Windows 10 nor in Google Chrome on Windows or Linux.

Possibly related to: https://bugzilla.mozilla.org/show_bug.cgi?id=712329
Comment 1 Samuel Mannehed cendio 2015-09-23 17:15:07 CEST
I have seen this issue for a long time (it has probably always been here) but note that since the changes in bug 5603 this bug is now shown to the users.
Comment 2 Pierre Ossman cendio 2016-02-10 09:06:02 CET
Got it today on Fedora 23 with Firefox 44.
Comment 3 Samuel Mannehed cendio 2016-10-07 16:57:31 CEST
Since the implementation of continuous updates and fences done on bug 5814 we now get this error message a lot more frequently.

Commit r31514 improved the consistency in how we send data on the websocket. It also added support for receiving Fence messages. A side effect of these changes is that we are now getting the "NS_ERROR_NOT_CONNECTED"-error more often.

The error message appears since queued-up actions are still trying to use the websocket even after it is closed.

In ThinLinc 4.6.0 (tested on castro), we see this error quite rarely. This is due to the fact that the message queue has to contain a message that provokes an action on the websocket that isn't executed before we have closed the connection to the socket.

In ThinLinc 4.7.0rc1, this error message ALWAYS pops up when logging out using a desktop environment that has some sort of graphical effect upon logout. Examples of such DE's are Gnome 3 and Unity. The new server will be sending fence messages quite frequently, which in turn triggers a response from the HTML5 client. Since we are trying to send a response on a closing socket we trigger the error.

To consistently trigger this error, no matter the desktop environment, or the type of server-initiated disconnection:

In a terminal within the session -
* run any application that triggers graphical updates (glxgears for example)
* run tl-disconnect
Comment 4 Samuel Mannehed cendio 2016-10-07 16:58:52 CEST
Created attachment 751 [details]
Screenshot of the error
Comment 5 Samuel Mannehed cendio 2016-10-07 17:02:28 CEST
Moving from Future to '---' milestone for discussion since the error message is now extremely frequent and very visual. I believe this gives a very bad impression of the HTML5 client for all Firefox users. We should consider at least hiding the error message for ThinLinc 4.7.0 to spare headache for ThinLinc administrators and customers. A proper solution could wait until next release in my opinion.
Comment 6 Samuel Mannehed cendio 2016-10-07 17:29:11 CEST
I cannot provoke the error using the UI disconnect button. Only seen on server-initated disconnects.
Comment 7 Samuel Mannehed cendio 2017-04-20 11:23:45 CEST
Created attachment 802 [details]
Screenshot of the error

After changes done on bug 6132, the error now looks like this.
Comment 8 Samuel Mannehed cendio 2017-04-21 16:03:31 CEST
This error message is hidden for now, done on bug 6132. When solving this bug, revert commit r32426.
Comment 9 Pierre Ossman cendio 2019-10-09 15:25:05 CEST
It seems Firefox has fixed this. We should remove the code and retest.
Comment 11 Niko Lehto cendio 2019-11-06 10:31:39 CET
(In reply to comment #3)
Removed the workaround and re-tested following these instructions:

> To consistently trigger this error, no matter the desktop environment, or the
> type of server-initiated disconnection:
> 
> In a terminal within the session -
> * run any application that triggers graphical updates (glxgears for example)
> * run tl-disconnect
I also ran youtube in the backround for extra provocation.

Tested on:
* Fedora 30  - Firefox 69
* Windows 10 - Firefox 70
* macOS 10   - Firefox 70

Could not provoke this error message neither as pop-up window nor as a console error. So it seems to work after removing the workaround.
Comment 12 Samuel Mannehed cendio 2019-11-06 14:14:37 CET
I too tried to reproduce the error mutliple times now that our workaround is removed:

 1. Running glxgears in the session
 2. Running vncconfig -disconnect
 3. No errors seen

Looks good, closing.

Note You need to log in before you can comment on or make changes to this bug.