Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032663Openbravo ERPA. Platformpublic2016-04-14 10:112016-06-17 19:38
alostale 
alostale 
normaltrivialrandom
closedfixed 
5
 
3.0PR16Q3 
caristu
Core
No
0032663: request to AlertActionHandler while switching role logs error
Recently, int-gui job is sometimes run as unstable.

The cause of this instabilities is errors in openbravo.log [1].

This situation occurs in case there is a request to AlertActionHandler in parallel while switching role if previous role was in a different client/organization than the ones granted to the default role assigned to current user. This occurs if currrent session's settings (role/client/org) have been partially removed when alert request is processed, in this case it is trying to apply default user's client-org with current role which might not match.


---
[1] see https://ci.openbravo.com/job/int-gui-pgsql/1522/artifact/SANDBOX/tomcat-logs/int-gui-pgsql.log [^]

2016-04-13 16:11:06,954 [TP-Processor8] ERROR org.openbravo.base.secureApp.LoginUtils - Login organization is not in role organizations list
2016-04-13 16:11:06,977 [TP-Processor8] ERROR org.openbravo.base.secureApp.LoginUtils - Login client is not in role clients list
0. Apply attached diff. It delays backend processing of role switching. So at least one alert request is received during this period.
1. Login as Openbravo. Ensure the following settings are marked as default, if they are not mark them and switch to that role:
  * Role: F&B group admin
  * Org: España Norte
2. Switch role to:
  * Role: QA Testing Admin
  * Org: Main
3. Wait till alert request and check in log:

   ERROR org.openbravo.base.secureApp.LoginUtils - Login organization is not in role organizations list. Role: 4028E6C72959682B01295A071429011E, Org: E443A31992CB4635AFCAEABE7183CE85
No tags attached.
diff sleep-login.diff (716) 2016-06-01 08:26
https://issues.openbravo.com/file_download.php?file_id=9462&type=bug
Issue History
2016-04-14 10:11alostaleNew Issue
2016-04-14 10:11alostaleAssigned To => platform
2016-04-14 10:11alostaleModules => Core
2016-04-14 10:11alostaleTriggers an Emergency Pack => No
2016-04-14 10:16hgbotCheckin
2016-04-14 10:16hgbotNote Added: 0085630
2016-05-06 08:56alostaleAssigned Toplatform => lorenzofidalgo
2016-05-17 10:17lorenzofidalgoStatusnew => acknowledged
2016-05-17 10:18lorenzofidalgoNote Added: 0086491
2016-05-25 17:03hgbotCheckin
2016-05-25 17:03hgbotNote Added: 0086750
2016-06-01 08:03alostaleAssigned Tolorenzofidalgo => alostale
2016-06-01 08:03alostaleSummaryinstabilities in int-gui job => request to AlertActionHandler while switching role logs error
2016-06-01 08:03alostaleDescription Updatedbug_revision_view_page.php?rev_id=12274#r12274
2016-06-01 08:21alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12276#r12276
2016-06-01 08:26alostaleFile Added: sleep-login.diff
2016-06-01 09:26hgbotCheckin
2016-06-01 09:26hgbotNote Added: 0086871
2016-06-01 09:26hgbotStatusacknowledged => resolved
2016-06-01 09:26hgbotResolutionopen => fixed
2016-06-01 09:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ab794c23a5560882cedc3a7960f0558f8513104f [^]
2016-06-01 09:26alostaleReview Assigned To => caristu
2016-06-02 10:15caristuNote Added: 0086905
2016-06-02 10:15caristuStatusresolved => closed
2016-06-02 10:15caristuFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087448
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087571
2016-06-17 19:38hudsonbotCheckin
2016-06-17 19:38hudsonbotNote Added: 0087583

Notes
(0085630)
hgbot   
2016-04-14 10:16   
Repository: erp/devel/pi
Changeset: 4f9959e58bd3fee1a5fa7f9ad1cc27590ded47f5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 14 10:16:14 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4f9959e58bd3fee1a5fa7f9ad1cc27590ded47f5 [^]

related to bug 32663: instabilities in int-gui job

  Added extra log when trying to log with incorrect client/org

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0086491)
lorenzofidalgo   
2016-05-17 10:18   
These are two executions with the new logs added to bound this issue:
https://ci.openbravo.com/view/qa/job/qa-pi-gui-pgsql/1595/consoleText [^]
https://ci.openbravo.com/view/qa/job/qa-pi-gui-oracle/1411/consoleText [^]
(0086750)
hgbot   
2016-05-25 17:03   
Repository: erp/devel/pi
Changeset: 7820fcf679e382e5ddfac8c741e641f30e31e746
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 25 17:03:16 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7820fcf679e382e5ddfac8c741e641f30e31e746 [^]

related to issue 32663: instabilities in int-gui job

   Added stack trace when error about invalid client/org is logged

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0086871)
hgbot   
2016-06-01 09:26   
Repository: erp/devel/pi
Changeset: ab794c23a5560882cedc3a7960f0558f8513104f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jun 01 09:24:38 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ab794c23a5560882cedc3a7960f0558f8513104f [^]

fixed bug 32663: request to AlertActionHandler while switching role logs error

  Under certain circumstances, it was possible to send alert handler requests while
  in process of switching to a different role. This requests might be processes
  with a partially created session, logging error messages in openbravo.log.

  This has been fixed by preventing to send these requests from client, while
  logging in is being processed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-manager.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js
---
(0086905)
caristu   
2016-06-02 10:15   
Verified in pi@ab794c23a556
(0087448)
hudsonbot   
2016-06-17 19:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0087571)
hudsonbot   
2016-06-17 19:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0087583)
hudsonbot   
2016-06-17 19:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test