Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0055974 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [POS2] Core | major | have not tried | 2024-07-11 09:37 | 2024-07-15 11:28 | |||||||
Reporter | AugustoMauch | View Status | public | |||||||||
Assigned To | ablasco | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
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 | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
![]() |
|
![]() |
|
(0166967) hgbot (developer) 2024-07-15 11:28 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1543 [^] |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |