Bug 5003 - Handle errors better in the login form for the HTML5 client
Summary: Handle errors better in the login form for the HTML5 client
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: 4.1.1
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.4.0
Assignee: Samuel Mannehed
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks:
 
Reported: 2014-02-26 08:11 CET by Henrik Andersson
Modified: 2015-04-30 12:41 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2014-02-26 08:11:50 CET
At a customer site their tlwebaccess log contains a few tracebacks, all the same as the following one:

2014-02-04 11:16:35 INFO tlwebaccess[19186]: Connection from XX.XX.XX.XX, port 55121
2014-02-04 11:16:35 ERROR tlwebaccess[19187]: code 500, message Internal error on page '/main/'
2014-02-04 11:16:35 INFO tlwebaccess[19187]: "POST /main/ HTTP/1.1" 500 -
2014-02-04 11:16:35 ERROR tlwebaccess[19187]: ----------------------------------------
2014-02-04 11:16:35 ERROR tlwebaccess[19187]: Traceback (most recent call last):
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:   File "/opt/thinlinc/sbin/tlwebaccess", line 272, in post_or_get
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:     O0ooOooooO , iIIii1ii11IIIiiI = getattr ( oO , action ) ( OOo00O0 , oooooOoo0ooo , O0ooOooooO )
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:   File "/opt/thinlinc/modules/thinlinc/tlwebaccess/main.py", line 141, in do_POST
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:     self . _POST_METHODS . get ( page_name , self . error_404 ) ( query ) )
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:   File "/opt/thinlinc/modules/thinlinc/tlwebaccess/main.py", line 223, in home
2014-02-04 11:16:35 ERROR tlwebaccess[19187]:     o0O = [ int ( i1I1iI ) , int ( oo0OooOOo0 ) ]
2014-02-04 11:16:35 ERROR tlwebaccess[19187]: ValueError: invalid literal for int() with base 10: 'undefined'
Comment 1 Samuel Mannehed cendio 2014-11-13 17:10:24 CET
Fixed in commit 29597.
Comment 2 Samuel Mannehed cendio 2014-11-13 17:13:44 CET
(In reply to comment #1)
> Fixed in commit 29597.

Updated in r29598.
Comment 3 Samuel Mannehed cendio 2014-11-14 14:47:22 CET
Reverted two previous commits in r29601 since the traceback problem was solved by commit 28723, done as part of bug 5030.

don't submit the form if the attributes are undefined - r29602
better error handling on the login form - r29603
Comment 4 Pierre Ossman cendio 2015-04-24 15:05:10 CEST
When does this occur? How do I test it?
Comment 5 Samuel Mannehed cendio 2015-04-24 15:58:53 CEST
As noted in comment #3 the traceback was fixed in ThinLinc 4.2 and the commits for this bug was not very related. I am changing the summary to better reflect this.

Tester should review the changes and verify that the login isn't completed when innerWidth or innerHeight is undefined on the window.
Comment 6 Pierre Ossman cendio 2015-04-28 14:30:24 CEST
And how do I make them undefined? The developer console doesn't seem to respect changes to such attributes. The original report doesn't state which browser was used.
Comment 7 Pierre Ossman cendio 2015-04-28 14:55:36 CEST
I'm also not properly getting the error message about missing websockets support on IE 8 and IE 9. It shows up sometimes, but not always.
Comment 8 Samuel Mannehed cendio 2015-04-29 16:05:34 CEST
(In reply to comment #6)
> And how do I make them undefined? The developer console doesn't seem to respect
> changes to such attributes. The original report doesn't state which browser was
> used.

IE 8 doesn't have innerWidth or innerHeight for example.

To submit the loginform you will probably have to enable the submit-button since it's disabled if the browser doesn't support websockets etc. In IE 8 you can open the Dev Tools and modify the html of the button.


(In reply to comment #7)
> I'm also not properly getting the error message about missing websockets
> support on IE 8 and IE 9. It shows up sometimes, but not always.

Fixed in r30280.

Apparently old versions of IE doesn't create all objects until you have opened the Dev Tools:

http://stackoverflow.com/questions/7742781/why-javascript-only-works-after-opening-developer-tools-in-ie-once
Comment 9 Pierre Ossman cendio 2015-04-30 12:41:39 CEST
I get a proper error message on old versions of IE now. And the login button refuses to do anything when innerwidth/innerheigh are undefined.

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