Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036649
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajorsometimes2017-08-14 13:492017-12-22 13:22
ReportermalsasuaView Statuspublic 
Assigned Tomarvintm 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision4a3a5cc1a54b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036649: slow networking: logout is done and "Session for the ERP already exists..." message is displayed

Descriptionwhen 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."
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on design defect 0037271 newRetail Web POS offline behaviour should be improved 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0098871)
gorka_gil (administrator)
2017-09-06 18:18

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)
(0098890)
gorka_gil (administrator)
2017-09-07 16:47

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 (developer)
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
---
(0101233)
migueldejuana (developer)
2017-12-22 13:22

Reviewed

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker