Bug 1340928

Summary: UI traceback thrown after selecting any item from System tree (Cannot read property 'length' of undefined)
Product: [oVirt] ovirt-engine Reporter: Pavel Novotny <pnovotny>
Component: Backend.CoreAssignee: Vojtech Szocs <vszocs>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact: Alexander Wels <awels>
Priority: unspecified    
Version: 4.0.0CC: awels, bugs, oourfali
Target Milestone: ovirt-4.0.0-rc3Flags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:49:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1324860    
Attachments:
Description Flags
ui.log with exception none

Description Pavel Novotny 2016-05-30 17:48:04 UTC
Created attachment 1162951 [details]
ui.log with exception

Description of problem:
Selecting any item from System tree while focused on Dashboard tab causes UI exception to be thrown.
On the other hand, UI still seems to work well. You are able to navigate through other tabs and do various actions as usual.

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.0.master.20160529171307.git359707b.el7.centos.noarch
ovirt-engine-dashboard-0.0.1-2.20160527git3bb1fe3.el7.centos.noarch

Browsers:
Chromium 50.0.2661.102
Firefox 45.1.1 ESR (Mozilla)

How reproducible:
100%

Steps to Reproduce:
1. Make sure Dashboard tab is active.
2. Click on 'Data Centers' node from System tree on the left (or any other tree node).
3.

Actual results:
UI exception is thrown with message "Cannot read property 'length' of undefined".
See attached ui.log for details.


Expected results:
No UI exception.

Additional info:
1) Exception in attached ui.log is from Chromium 50.0.2661.102. 
(Firefox exception was logged obfuscated, although debug symbols were installed and symbol map file for this browser permutation was present.)

2) engine.log did not contain any WARN or ERROR messages relevant to this issue.

3) If Dashboard tab is not active, no UI exception is thrown.

Comment 1 Vojtech Szocs 2016-05-30 18:04:47 UTC
@Pavel, thanks for posting the UI logs.

This bug originates in WebAdmin GWT/Java code. I suspect the problematic code is in CommonModel#systemTree_ItemChanged method.

> 1) Exception in attached ui.log is from Chromium 50.0.2661.102. 
> (Firefox exception was logged obfuscated, although debug symbols were installed and symbol map file for this browser permutation was present.)

Hm, attached UI logs ("with Firefox 45.1.1 ESR") seem un-obfuscated to me (?)

> 2) engine.log did not contain any WARN or ERROR messages relevant to this issue.

This is by design.

engine.log relates to backend code. ui.log relates to frontend code.

Comment 2 Pavel Novotny 2016-05-31 09:48:57 UTC
(In reply to vszocs from comment #1)
> @Pavel, thanks for posting the UI logs.
> 
> This bug originates in WebAdmin GWT/Java code. I suspect the problematic
> code is in CommonModel#systemTree_ItemChanged method.
> 
> > 1) Exception in attached ui.log is from Chromium 50.0.2661.102. 
> > (Firefox exception was logged obfuscated, although debug symbols were installed and symbol map file for this browser permutation was present.)
> 
> Hm, attached UI logs ("with Firefox 45.1.1 ESR") seem un-obfuscated to me (?)
> 

You are right, the Firefox error message "c is undefined" confused me, because it looks quite cryptic. At least with comparison to Chromium's "Cannot read property 'length' of undefined".

Comment 3 Vojtech Szocs 2016-05-31 13:41:43 UTC
(In reply to Pavel Novotny from comment #2)
> You are right, the Firefox error message "c is undefined" confused me,
> because it looks quite cryptic. At least with comparison to Chromium's
> "Cannot read property 'length' of undefined".

Indeed, maybe it has to do with how Firefox vs. Chrome report actual JS errors in the browser's console. (The GWT/Java stack trace below that line seems to be identical for both browsers.)

Thanks for confirming that UI stack trace de-obfuscation still works, I was worried that we have an issue there.

Comment 5 Pavel Novotny 2016-06-24 15:29:04 UTC
Verified in 
ovirt-engine-dashboard-1.0.0-20160615git43298a4.el7ev.x86_64
rhevm-4.0.0.6-0.1.el7ev.noarch (build 4.0.0-19).

Browsers:
Firefox 45.2.0 ESR
Firefox 47.0
Chromium 50.0.2661.102

Verified according to reproducer from comment 0.
Selecting any item from the System tree no longer raises a UI exception.

Comment 6 Sandro Bonazzola 2016-07-05 07:49:37 UTC
oVirt 4.0.0 has been released, closing current release.