Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0054239 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] Core | major | have not tried | 2024-01-02 13:07 | 2024-03-21 18:25 | |||
Reporter | jarmendariz | View Status | public | |||||
Assigned To | cberner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 24Q2 | |||
Status | closed | 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 | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0054239: Error page is not shown if the error occurs during registry process | |||||||
Description | In case the application has a blocking error, an error page defined in ErrorFallback.jsx is shown, but this page shows the company logo using the CompanyLogo component. If this error occurs during the registration process, where the State is not available yet, the Error page won't be shown and the user will encounter a blank screen. | |||||||
Steps To Reproduce | 1- Force an error during the registration process. This can be achieved by adding the following in checkIsRegistered() function in Registry.js: function checkIsRegistered(registry, name, type) { if (!_.has(registry, name) || name === 'OBC2_Logout') { throw Error(`${type} ${name} is not registered`); } } 2- Open POS2 application in the browser. Instead of rendering the login page or the error page, a blank screen will appear and the following errors in the browser's console: Uncaught Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (useReduxContext.js:24:1) at useSelector (useSelector.js:125:1) at CompanyLogo (CompanyLogo.jsx:31:1) ... | |||||||
Proposed Solution | Adding a check in CompanyLogo to show no logo if the state information is not available, preventing the error situation. This way the error page will be shown at least even if it has no logo. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||||||||||||||||||||
|
![]() |
|
(0161907) hgbot (developer) 2024-03-08 14:48 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1410 [^] |
(0162515) hgbot (developer) 2024-03-21 18:25 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1410 [^] |
(0162516) hgbot (developer) 2024-03-21 18:25 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: a6b9f588147a3644df1fd416eabe0d7a7df8bee5 Author: Cristian Berner <cristian.berner@openbravo.com> Date: 21-03-2024 17:05:59 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/a6b9f588147a3644df1fd416eabe0d7a7df8bee5 [^] Fixes ISSUE-54239: Error page is not shown if the error occurs during registry process The main problem was that CompanyLogo component is used in the ErrorFallback component, and it makes use of redux state. When errors happen in the initialization processes(registration of components, and other initializations), the ErrorFallback component was being rendered without any provider. As a fix, even when there are registration errors, CompanyLogo is added conditionally, if there's no state, it will not be added. --- M web-jspack/org.openbravo.core2/src/components/ErrorFallback/ErrorFallback.jsx --- |
![]() |
|||
Date Modified | Username | Field | Change |
2024-01-02 13:07 | jarmendariz | New Issue | |
2024-01-02 13:07 | jarmendariz | Assigned To | => Triage Platform Base |
2024-01-02 13:07 | jarmendariz | OBNetwork customer | => No |
2024-01-02 13:07 | jarmendariz | Triggers an Emergency Pack | => No |
2024-03-08 14:48 | hgbot | Merge Request Status | => open |
2024-03-08 14:48 | hgbot | Note Added: 0161907 | |
2024-03-08 14:49 | cberner | Assigned To | Triage Platform Base => cberner |
2024-03-13 10:14 | hgbot | Merge Request Status | open => approved |
2024-03-13 10:14 | hgbot | Merge Request Status | approved => open |
2024-03-13 10:16 | AugustoMauch | Relationship added | has duplicate 0054211 |
2024-03-13 10:16 | AugustoMauch | Status | new => scheduled |
2024-03-13 10:16 | AugustoMauch | Status | scheduled => resolved |
2024-03-13 10:16 | AugustoMauch | Resolution | open => fixed |
2024-03-13 10:16 | AugustoMauch | Status | resolved => new |
2024-03-13 10:16 | AugustoMauch | Resolution | fixed => open |
2024-03-13 10:17 | AugustoMauch | Status | new => scheduled |
2024-03-21 18:25 | hgbot | Merge Request Status | open => approved |
2024-03-21 18:25 | hgbot | Resolution | open => fixed |
2024-03-21 18:25 | hgbot | Status | scheduled => closed |
2024-03-21 18:25 | hgbot | Note Added: 0162515 | |
2024-03-21 18:25 | hgbot | Fixed in Version | => 24Q2 |
2024-03-21 18:25 | hgbot | Note Added: 0162516 | |
2024-05-08 12:05 | AugustoMauch | Relationship added | has duplicate 0053448 |
Copyright © 2000 - 2009 MantisBT Group |