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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041456
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-07-25 11:432023-08-01 06:31
ReporterguillermogilView Statuspublic 
Assigned Toalekosmp86 
PrioritynormalResolutionfixedFixed in VersionRR19Q4
StatusclosedFix in branchFixed in SCM revision4ed8e628a232
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041456: Missing check of callback is a function in failover

DescriptionMissing check of callback is a function in failover then it tries to execute it event if it those not exists.
Steps To ReproduceHaving a Process type failover without callbacks
Make it fail on the server

You will see an stacktrace:
c93333d190a066191b4714ea79085f65.js:formatted:1243 Uncaught TypeError: oldcallbackError is not a function
    at callbackError (c93333d190a066191b4714ea79085f65.js:formatted:1243)
    at serviceError (c93333d190a066191b4714ea79085f65.js:formatted:1053)
    at Object.fail [as origFail] (c93333d190a066191b4714ea79085f65.js:formatted:1107)
    at Object.ajaxRequest.fail (c93333d190a066191b4714ea79085f65.js:formatted:1835)
    at Object.timeoutComplete (enyo.js:900)
Proposed Solution  OB.DS.Process.FailOver.prototype.exec = function (params, callback, callbackError, async, timeout) {
    var process = new OB.DS.Process(this.source),
        oldCallback = callback,
        oldcallbackError = callbackError;
    callback = function (data) {
      OB.MobileApp.model.hideSynchronizingDialog();
      oldCallback(data);
    };
    callbackError = function (data) {
      OB.MobileApp.model.hideSynchronizingDialog();
      oldcallbackError(data);
    };
    OB.MobileApp.model.showSynchronizingDialog();
    process.exec(params, callback, callbackError, async, timeout);
  };

should be:
  OB.DS.Process.FailOver.prototype.exec = function (params, callback, callbackError, async, timeout) {
    var process = new OB.DS.Process(this.source),
        oldCallback = callback,
        oldCallbackError = callbackError;
    callback = function (data) {
      OB.MobileApp.model.hideSynchronizingDialog();
      if (oldCallback && oldCallback instanceof Function) {
        oldCallback(data);
      }
    };
    callbackError = function (data) {
      OB.MobileApp.model.hideSynchronizingDialog();
      if (oldCallbackError && oldCallbackError instanceof Function) {
        oldCallbackError(data);
      } else if (oldCallback && oldCallback instanceof Function) {
        oldCallback(data);
      }
    };
    OB.MobileApp.model.showSynchronizingDialog();
    process.exec(params, callback, callbackError, async, timeout);
  };
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0113795)
hgbot (developer)
2019-08-02 20:15

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4ed8e628a232ef3833f94b1e74f17b5ab46fb755
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Aug 01 15:50:49 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4ed8e628a232ef3833f94b1e74f17b5ab46fb755 [^]

Fixed issue 41456: Added check of 'callback is a function' in failover

---
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
---
(0153040)
biuopome (reporter)
2023-08-01 06:31

test oke and reviews good
contact: https://drift-boss.io [^]

- Issue History
Date Modified Username Field Change
2019-07-25 11:43 guillermogil New Issue
2019-07-25 11:43 guillermogil Assigned To => Retail
2019-07-25 11:43 guillermogil Resolution time => 1565474400
2019-07-25 11:43 guillermogil Triggers an Emergency Pack => No
2019-07-25 11:48 guillermogil Proposed Solution updated
2019-07-25 11:53 aaroncalero Proposed Solution updated
2019-08-01 20:55 alekosmp86 Assigned To Retail => alekosmp86
2019-08-02 20:15 hgbot Checkin
2019-08-02 20:15 hgbot Note Added: 0113795
2019-08-02 20:15 hgbot Status new => resolved
2019-08-02 20:15 hgbot Resolution open => fixed
2019-08-02 20:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4ed8e628a232ef3833f94b1e74f17b5ab46fb755 [^]
2019-08-07 07:48 marvintm Review Assigned To => marvintm
2019-08-07 07:48 marvintm Status resolved => closed
2019-08-07 07:48 marvintm Fixed in Version => RR19Q4
2023-07-06 06:16 manropezap Note Added: 0152151
2023-07-06 06:38 priyam Note Deleted: 0152151
2023-08-01 06:31 biuopome Note Added: 0153040


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker