Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039591Retail ModulesWeb POSpublic2018-11-06 09:572018-11-19 16:21
marvintm 
marvintm 
urgentmajoralways
closedfixed 
5
 
RR18Q3.3RR18Q3.3 
gorka_gil
No
0039591: Cannot access ERP after accessing first ERP, and then WebPOS, on the same browser profile
It's no longer possible to access ERP if in the same profile first the ERP is accessed, and then the WebPOS is opened.
- Clear the cache
- Open a browser tab. Access the ERP login page, and do login in the ERP with Openbravo user.
- Open another browser tab in the same browser profile. Access the WebPOS.
- A popup will show, telling that you need to login again. Click ok.
- Then come back to the first tab (ERP) and press F5. Notice that it's no longer possible to access the ERP.
When the WebPOS realises there is a valid session, it attempts to login. However, the session the ERP created is not valid for the WebPOS, as the role is not authorised for the WebPOS application. Therefore, the WebPOS cancels the session, and refreshes the page. At this point the service workers are used to load the application, but one of the requests is redirected to the main openbravo login page, and this redirection is cached. After this, the login page is "cached", but without content, and this is why it's no longer possible to access the ERP.

The solution is to prevent caching the redirections, as we will never be interested in caching those.
No tags attached.
blocks defect 0039589 closed marvintm Cannot access ERP after accessing first ERP, and then WebPOS, on the same browser profile 
Issue History
2018-11-06 09:58marvintmTypedefect => backport
2018-11-06 09:58marvintmTarget Version => RR18Q3.3
2018-11-14 19:17hgbotCheckin
2018-11-14 19:17hgbotNote Added: 0107912
2018-11-14 19:17hgbotStatusscheduled => resolved
2018-11-14 19:17hgbotResolutionopen => fixed
2018-11-14 19:17hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR18Q3.3/org.openbravo.mobile.core/rev/106da55fdd8832f54290ffaf1fd3dab4eadf8c07 [^]
2018-11-19 16:21gorka_gilReview Assigned To => gorka_gil
2018-11-19 16:21gorka_gilStatusresolved => closed
2018-11-19 16:21gorka_gilFixed in Version => RR18Q3.3

Notes
(0107912)
hgbot   
2018-11-14 19:17   
Repository: retail/backports/3.0RR18Q3.3/org.openbravo.mobile.core
Changeset: 106da55fdd8832f54290ffaf1fd3dab4eadf8c07
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Nov 14 19:17:40 2018 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR18Q3.3/org.openbravo.mobile.core/rev/106da55fdd8832f54290ffaf1fd3dab4eadf8c07 [^]

Fixed issue 39591. Cannot access ERP after accessing first ERP, and then WebPOS, on the same browser profile
Redirected responses will no longer be cached by the service workers. This will prevent the caching of a redirected response to the ERP login page, which did not work correctly, so this in turn prevents being unable to access the ERP login page.

---
M web/org.openbravo.mobile.core/source/offline/ob-sources-sw.js
---