Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0036649 | Retail Modules | Web POS | public | 2017-08-14 13:49 | 2017-12-22 13:22 |
|
Reporter | malsasua | |
Assigned To | marvintm | |
Priority | high | Severity | major | Reproducibility | sometimes |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | migueldejuana |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0036649: slow networking: logout is done and "Session for the ERP already exists..." message is displayed |
Description | when networking is slow, and refresh (F5) is done, logout is done and when you try to do login again, message is displayed:
"Session for the ERP already exists You have already logged in the ERP in this browser. Therefore, you cannot log in. If the ERP session is valid for this application, you only need to refresh the page. If not, you need to log out of the ERP before you can log in." |
Steps To Reproduce | (randomly)
. do login
. configure chrome to simulate slow networking (gprs)
. refresh browser
logout is done.
. do login:
error message is displayed: "Session for the ERP already exists You have already logged in the ERP in this browser. Therefore, you cannot log in. If the ERP session is valid for this application, you only need to refresh the page. If not, you need to log out of the ERP before you can log in."
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | design defect | 0037271 | | new | Retail | Web POS offline behaviour should be improved | Not all the children of this issue are yet resolved or closed. |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-08-14 13:49 | malsasua | New Issue | |
2017-08-14 13:49 | malsasua | Assigned To | => Retail |
2017-08-14 13:49 | malsasua | Resolution time | => 1504562400 |
2017-08-14 13:49 | malsasua | Triggers an Emergency Pack | => No |
2017-09-06 18:18 | gorka_gil | Note Added: 0098871 | |
2017-09-06 18:19 | gorka_gil | Assigned To | Retail => gorka_gil |
2017-09-06 18:19 | gorka_gil | Status | new => acknowledged |
2017-09-07 16:35 | gorka_gil | Assigned To | gorka_gil => Retail |
2017-09-07 16:47 | gorka_gil | Note Added: 0098890 | |
2017-09-11 10:44 | marvintm | Resolution time | 1504562400 => |
2017-09-11 10:44 | marvintm | Type | defect => design defect |
2017-09-11 10:44 | marvintm | Relationship added | depends on 0036822 |
2017-11-09 18:51 | marvintm | Relationship added | depends on 0037271 |
2017-11-09 18:52 | marvintm | Relationship deleted | depends on 0036822 |
2017-11-09 20:11 | marvintm | Status | acknowledged => scheduled |
2017-11-09 20:11 | marvintm | Assigned To | Retail => marvintm |
2017-12-01 10:05 | hgbot | Checkin | |
2017-12-01 10:05 | hgbot | Note Added: 0100856 | |
2017-12-01 10:05 | hgbot | Status | scheduled => resolved |
2017-12-01 10:05 | hgbot | Resolution | open => fixed |
2017-12-01 10:05 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4a3a5cc1a54b35b9d6789173cbec5cf7c0564d9c [^] |
2017-12-22 13:22 | migueldejuana | Review Assigned To | => migueldejuana |
2017-12-22 13:22 | migueldejuana | Note Added: 0101233 | |
2017-12-22 13:22 | migueldejuana | Status | resolved => closed |
Notes |
|
|
Reproducible in current pi (6 Sep 2017 - future 17q4) with chrome 60.
Note in chrome 60 there is not gprs profile, needed to create a custom one with:
Up: 50 (kb/s) , Down: 50 (kb/s) , Latency 500 (ms) |
|
|
|
Started with this issue, but because of the complexity left for another developer with more experience to finish it.
Analyzed till now:
a) First problem is that the check of the erp session active prevents to create a new session, to fix that:
diff -r 9273d52d35d5 src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
--- a/src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java Tue Sep 05 16:31:28 2017 -0400
+++ b/src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java Thu Sep 07 16:36:24 2017 +0200
@@ -212,7 +213,8 @@
OBContext.setAdminMode(false);
Session session = OBDal.getInstance().get(Session.class, id);
try {
- return (session != null && session.isSessionActive());
+ return (session != null && session.isSessionActive() && RequestContext.get()
+ .getSessionAttribute("POSTerminal") == null);
} finally {
OBContext.restorePreviousMode();
}
b) After that, is failing after the login:
- it goes offline, then back online and in a looks like has lost the context:
postSyncProcessActions: function() {
if (OB.MobileApp.model.get('context').user [....]
TypeError: Cannot read property 'user' of null
Note: increasing this timeout:
url: this.get('loginUtilsUrl'),
cacheBust: false,
timeout: 5000,
to 20000, fix the problem b) but we don't want to increase this timeout, since it will be less responsible to change to offline status. |
|
|
(0100856)
|
hgbot
|
2017-12-01 10:05
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4a3a5cc1a54b35b9d6789173cbec5cf7c0564d9c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Nov 09 20:11:33 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4a3a5cc1a54b35b9d6789173cbec5cf7c0564d9c [^]
Fixed issue 36649. [OfflineImprovements] Login will be more reliable in bad networks. Three changes have been made:
- POSLoginHandler will no longer reject the request for new session when session already exists. This will solve the problem of POSLoginHandler request giving timeout, and then failing on second try due to the session already existing in the backend.
- Reduced timeout of org.openbravo.mobile.core.context request to improve responsiveness
- Now if preRenderActions request fails due to timeout or other reason, an attempt to execute offline login will be done. This will only work if the user really inserted user/password, otherwise a navigation to login page will be done as we lack sufficient information to do offline login.
---
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
|
|
|
|
|