Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0055974 | POS2 | Core | public | 2024-07-11 09:37 | 2024-07-15 11:28 |
Reporter | AugustoMauch | ||||
Assigned To | ablasco | ||||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0055974: An exception on a OnAppRenderAction will result in others not being executed, application starting "normally" | ||||
Description | Developers can define functions as OnAppRenderActions, that will be executed once the application is initially rendered, before the user can interact with it. If any of those functions throw an exception, the other OnAppRenderActions that would be executed after, won't be, and the application will start normally. The application should not start normally, as there might be relevant business logic in the OnAppRenderActions that were not executed | ||||
Steps To Reproduce | - Add an new OnAppRenderAction below this one: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/ob-init.js#L3311 [^] - Put a breakpoint on the new OnAppRenderAction - Log in vallblanca's with the current default POS role (VallBlancaUser). Check that the new OnAppRenderAction is executed (this is OK) - Change vallblanca's default POS role to use VallBlancaManual. Log in again. Check that the new OnAppRenderAction is not executed (this is NOT OK). It is not executed because the openInitialCount threw an exception, because the VallBlancaManual role does not have access to a user action that is executed as part of that function. | ||||
Proposed Solution | - Wrap this code on a try/catch block: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/App/App.jsx#L36 [^] - If the catch block captures an exception, show its message using the askConfirmation API and then log out - Contact the POS team so that they decide what should be done about the exception in the openInitialCount OnAppRenderAction | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2024-07-11 09:37 | AugustoMauch | New Issue | |||
2024-07-11 09:37 | AugustoMauch | Assigned To | => ablasco | ||
2024-07-11 09:37 | AugustoMauch | Triggers an Emergency Pack | => No | ||
2024-07-15 11:28 | hgbot | Note Added: 0166967 |
Notes | |||||
|
|||||
|
|