Bug 816598 - "Failed to load resource composite data" message is incorrectly logged when already logged out user tries to browse resources
Summary: "Failed to load resource composite data" message is incorrectly logged when a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.0.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: DR03
: JON 3.2.1
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-26 13:27 UTC by bkramer
Modified: 2018-11-27 19:46 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-08 17:43:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
resource_navigation_loggedout (107.88 KB, image/png)
2013-11-15 15:53 UTC, Armine Hovsepyan
no flags Details
image shows same behavior as the original issue. (54.52 KB, image/png)
2014-02-18 18:31 UTC, Mike Foley
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 816604 0 medium NEW "Failed to load resource composite data" message is incorrectly logged when already logged out user tries to browse reso... 2022-03-31 04:28:18 UTC

Internal Links: 816604

Description bkramer 2012-04-26 13:27:21 UTC
Description of problem:

1. The user login to the JON UI and start to browse;
2. Right click on "Inventory" link at the top of the UI and open a new tab;
3. Logout from the new tab;
4. Go back to the first tab and attempt to select any child resource. The following message will be displayed near the top of the screen:

"Resource with id [xyz] does not exist or is not accessible".

5. Click on "Platforms" and you the following message will be logged:

"Failed to load resource composite data"


Version-Release number of selected component (if applicable):
JON 3.0.1

How reproducible:
Always

Steps to Reproduce:
1. 
2.
3.
  
Actual results:

The messages that are logged do not reflect the true state that the user has been logged out. 


Expected results:
We should log correct message so that user knows that he needs to login again.

Additional info:

Comment 1 bkramer 2012-04-26 13:38:33 UTC
These are logged in the Message Center:

Message :	
Failed to load data for this node
Severity :	
Error
	
Time :	
Thursday, April 26, 2012 1:45:57 PM Etc/GMT-1
Detail :	

com.google.gwt.user.client.rpc.InvocationException:
--- STACK TRACE FOLLOWS ---

   at Unknown.java_lang_Throwable_fillInStackTrace__Ljava_lang_Throwable_2(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_InvocationException_$InvocationException__Lcom_google_gwt_user_client_rpc_InvocationException_2Ljava_lang_String_2Lcom_google_gwt_user_client_rpc_InvocationException_2(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)


****************************************************************************

Message :	
Resource with id [10181] does not exist or is not accessible
Severity :	
Warning
	
Time :	
Thursday, April 26, 2012 1:47:21 PM Etc/GMT-1
Detail :

Comment 2 Mike Foley 2012-04-30 15:45:22 UTC
setting priority based on bz triage ccrouch, loleary, mfoley

Comment 3 Charles Crouch 2012-08-03 02:20:49 UTC
Mike, is there anything we can do here that could fit into jon311?

Comment 4 Mike Thompson 2012-08-06 22:38:26 UTC
Ideally we would use client side interceptor capability like what Errai has. This would be the least coupled solution. But that is a long term solution. 


A Servlet filter could serve as an interceptor but it is more at the http request/response level and doesn't have access to all the RHQ application goodies. For things that are not dependent on the application code this is a good choice. It could do a lightweight ping of the servlet session as a heartbeat check, before returning the response to GWT.

A wrapper around the AsynchCallback interface would also work. Having this AbstractAsyncCallack we could wrap (or 'intercept') the callback onFailure, onSuccess methods for an invocationException or ping the servlet session for a heartbeat response. If the heartbeat is bad then a nice dialog message could be displayed or auto redirect to the login page. The only problem with this method is many global search and replaces, but it would be a one-to-one replacement.

Either solution is probably 1-2 day task.

Comment 5 Mike Thompson 2012-08-10 15:40:59 UTC
The other solution is that doesn't change as many files is the TrackingRequestCallback/TrackingRemoteSeviceProxy solution. This solution has less impact but is riskier as it requires some changes in LoginView as well. This solution impacts login state from what is essentially, an interceptor solution which has a smell to it.

Comment 6 Mike Thompson 2012-08-10 15:42:50 UTC
After further discussion we think this should NOT be part of jon311 as there exists risk to login which are not appropriate for inclusion of jon311.

Comment 7 Charles Crouch 2012-08-29 16:15:16 UTC
As per 8/20 triage pushing to JON312

Comment 8 mark yarborough 2012-11-06 20:05:03 UTC
Per 3.1.2 triage with loleary, mfoley, ccrouch, asantos: Okay to move to JON 3.2.

Comment 10 Armine Hovsepyan 2013-11-15 15:53:54 UTC
Created attachment 824579 [details]
resource_navigation_loggedout

Comment 11 Armine Hovsepyan 2013-11-15 15:54:35 UTC
re-assigning 
issue still visible in jon3.2 er5

Comment 13 Jirka Kremser 2014-01-31 11:32:26 UTC
I've already fixed this issue when working on bug 970181 (it is not a duplicate, but it is closely related). As for auto-refreshable  views like ResourceTitleBar, it has been fixed by commit 25706c31e6.

Tested in current master.. when performing the repro steps, the login dialog is correctly displayed.

Comment 14 Simeon Pinder 2014-02-18 15:08:03 UTC
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=336752

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.

Comment 15 Mike Foley 2014-02-18 18:29:39 UTC
I am documenting what I see in JON 3.2.1 DR1

1) in the "new" browser tab ... after logging out ... i see the login dialog displayed.  i this is confirming the fix documented in comment #13.

2) in the "original" browser tab ... i see an error message.  i am uploading an image of what i see.  this is exactly the same as the original error, step #5 in the original repro steps.  

because i see the same behavior in the orignal issue, i need to reject this issue. setting status to assigned.

Comment 16 Mike Foley 2014-02-18 18:31:46 UTC
Created attachment 864674 [details]
image shows same behavior as the original issue.

image shows same behavior as the original issue. because of this, i am unable to mark this BZ verified.

Comment 17 Jirka Kremser 2014-02-21 14:05:21 UTC
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=4ec41696e
time:    2014-02-21 15:02:59 +0100
commit:  4ec41696e0b3271bfd3d78fa1f5a57e08d4f88c2
author:  Jirka Kremser - jkremser
message: [BZ 816598] - "Failed to load resource composite data" message is
         incorrectly logged when already logged out user tries to browse
         resources - Enforcing the login dialog if the user is logged
         out (instead of throwing an exception). When logged out from a
         different browser tab, it takes about 3 seconds to propagate
         this information to the other tabs, however this is really an
         edge case. NOTE: If the login dialog is displayed on multiple
         browser tabs and user logs in to each of them separately, it
         will create multiple independent sessions that doesn't affect
         each other. Now if user logs out from a tab, it doesn't do
         anything to another tabs. This bug is about "forking" the user
         session by opening a new tab from the original web UI.

Comment 18 Libor Zoubek 2014-02-25 09:37:44 UTC
commit 71eb57a360127f4ab89733017b11c74603adcf69
Author: Jirka Kremser <jkremser>
Date:   Fri Feb 21 15:02:59 2014 +0100

    [BZ 816598] - "Failed to load resource composite data" message is incorrectly logged when already logged out user t

    (cherry picked from commit 4ec41696e0b3271bfd3d78fa1f5a57e08d4f88c2)
    Signed-off-by: Libor Zoubek <lzoubek>

    Conflicts:
        modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java

Comment 19 Simeon Pinder 2014-03-05 22:21:17 UTC
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=340294

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.

Comment 20 Mike Foley 2014-03-06 17:17:51 UTC
failed in JON 3.2.1 DR2

Comment 21 Jirka Kremser 2014-03-10 13:35:28 UTC
well, this is strange. It works in the master branch, but not in the release one. There must be something that was not cherry-picked.. I'll investigate it

Comment 22 Jirka Kremser 2014-03-10 14:54:46 UTC
As said in comment #13, this issue was partly fixed in bug 970181 and partly by commit 25706c31e6. However, neither of the two was cherry-picked to the release branch. I guess, it is also the reason of the conflict mentioned in comment #18. Libor, could you please do the cherry-picking also the two commits? Mea culpa, I forgot to tell you about it.

I've tried it and it solves the issue.

commits:
50aed986a19b2e1cbd7d13e179c0342857d22854
25706c31e65c006eb0b2c08ef5686bb70566964a

Comment 23 Libor Zoubek 2014-03-10 22:01:16 UTC
commit 5996de964363d5357a13db14c1d747a0f027fac9
Author: Jirka Kremser <jkremser>
Date:   Thu Oct 17 19:00:26 2013 +0200

    UI: Improvement to auto refreshable views: the refresh() method is not performed if the session has expired. If the

    (cherry picked from commit 25706c31e65c006eb0b2c08ef5686bb70566964a)
    Signed-off-by: Libor Zoubek <lzoubek>

commit e85bd2dcc7c39df353bd6460aa365d7f982e5735
Author: Jirka Kremser <jkremser>
Date:   Mon Dec 16 19:23:37 2013 +0100

    [BZ 970181] - RHQ doesn't work after restart with open GUI in web browser. - if the server restarts at the backgrou

    (cherry picked from commit 50aed986a19b2e1cbd7d13e179c0342857d22854)
    Signed-off-by: Libor Zoubek <lzoubek>

Comment 24 Simeon Pinder 2014-04-01 20:43:49 UTC
Moving to ON_QA as available for test in newest cumulative patch build from here:
http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.1.GA/4-01-2014/
I moved the earlier build to 3-18-2014.

Comment 25 Mike Foley 2014-04-02 18:55:13 UTC
Verified JON 3.2.1 CP1 (iteration #2)

Comment 26 Mike Foley 2014-05-08 17:43:25 UTC
JON 3.2.1 released week of 5/5/2014


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