Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028056Retail ModulesWeb POSpublic2014-11-03 15:102016-03-10 20:25
guilleaer 
Orekaria 
normalmajorsometimes
closedunable to reproduce 
5
RR14Q3.1 
RR16Q2 
Orekaria
No
0028056: Sometimes login gets stucked because asyncrony problems
Using 3.0RR14Q3.1 the login is not completed because asynchronous problems.

It only happens in the first login just after clean the cache.

If I try to debug the problem never happens.
Login into web POS. A database error is shown in the console.

 [SQLTransaction, SQLError]

"could not execute statement due to a constaint failure (19 constraint failed)"

After some research I've detected that session model is loaded twice. That generate the problem.

here the log.

keypressHandler - keyCode: 13 - keyIdentifier: Enter - charCode: 0 - which: 13 http://localhost:8080/openbravo/web/js/gen/6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:159:24 [^] 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:335
inside setUserModelOnline 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
initCache for user 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "User", tableName: "ad_user", entityName: "User", source: "org.openbravo.retail.posterminal.User", properties: Array[8]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
initCache for LogClient 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "LogClient", tableName: "obmobc_logclient", entityName: "LogClient", source: "org.openbravo.mobile.core.master.LogClient", local: true…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
initCache for session 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "Session", tableName: "ad_session", entityName: "Session", source: "org.openbravo.retail.posterminal.Session", properties: Array[6]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
execute create statement for model: x {modelName: "User", tableName: "ad_user", entityName: "User", source: "org.openbravo.retail.posterminal.User", properties: Array[8]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
execute create statement for model: x {modelName: "LogClient", tableName: "obmobc_logclient", entityName: "LogClient", source: "org.openbravo.mobile.core.master.LogClient", local: true…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
execute create statement for model: x {modelName: "Session", tableName: "ad_session", entityName: "Session", source: "org.openbravo.retail.posterminal.Session", properties: Array[6]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
inside loadTerminalInfo 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:176
this.initLocalDB 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:177
init local db 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:180
init local db - opened 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:180
init local db - execute change version 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:182
init local db - execute change version but version are equals 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:182
init local db - trigger terminal info ready 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:183
inside triggerLoadTerminalInfoReady 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:176
inside triggerLoadTerminalInfoReady 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:176
inside triggerLoadTerminalInfoReady 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:176
inside setUserModelOnline 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
initCache for user 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "User", tableName: "ad_user", entityName: "User", source: "org.openbravo.retail.posterminal.User", properties: Array[8]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
initCache for LogClient 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "LogClient", tableName: "obmobc_logclient", entityName: "LogClient", source: "org.openbravo.mobile.core.master.LogClient", local: true…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
initCache for session 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:210
inside initcache for model: x {modelName: "Session", tableName: "ad_session", entityName: "Session", source: "org.openbravo.retail.posterminal.Session", properties: Array[6]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:122
execute create statement for model: x {modelName: "User", tableName: "ad_user", entityName: "User", source: "org.openbravo.retail.posterminal.User", properties: Array[8]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
execute create statement for model: x {modelName: "LogClient", tableName: "obmobc_logclient", entityName: "LogClient", source: "org.openbravo.mobile.core.master.LogClient", local: true…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
execute create statement for model: x {modelName: "Session", tableName: "ad_session", entityName: "Session", source: "org.openbravo.retail.posterminal.Session", properties: Array[6]…} 6d5c7e946bc374a2a9712dcd12e903c4_OBMOBCR.js:125
-> error!! -> [SQLTransaction, SQLError] ""
init cache one by one. Attached a patch provided by Rafa Alonso
No tags attached.
depends on defect 0027465RR14Q4 closed Orekaria Stabilization: When 'setUserModelOnline' fails to save the current user info, the loading process fails 
diff diffAsyncIssue.diff (5,164) 2014-11-03 15:10
https://issues.openbravo.com/file_download.php?file_id=7461&type=bug
Issue History
2014-11-03 15:10guilleaerNew Issue
2014-11-03 15:10guilleaerAssigned To => Orekaria
2014-11-03 15:10guilleaerFile Added: diffAsyncIssue.diff
2014-11-03 15:10guilleaerTriggers an Emergency Pack => No
2014-11-25 15:10OrekariaRelationship addeddepends on 0027465
2016-03-10 20:25OrekariaReview Assigned To => Orekaria
2016-03-10 20:25OrekariaNote Added: 0084884
2016-03-10 20:25OrekariaStatusnew => closed
2016-03-10 20:25OrekariaResolutionopen => unable to reproduce
2016-03-10 20:25OrekariaFixed in Version => RR16Q2

Notes
(0084884)
Orekaria   
2016-03-10 20:25   
no longer reproducible