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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051234
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POScriticalhave not tried2022-12-22 17:212023-01-09 18:52
ReporterguilleaerView Statuspublic 
Assigned Tomeriem_azaf 
PriorityurgentResolutionfixedFixed in Version23Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051234: Cannot read properties of undefined (find) -> infinite loop and chrome crashes

DescriptionOnce an error is raised in the initialitation secuence the terminal becamos unusable and creates an infinite loop which finally consumes all the memory and makes chrome crash.

After some research I have the feeling that the problem comes from the terminal information which is stored in indexedDb (login DB)(User table)

The data stored there is corrupted because the terminal information stored there only have the property "terminalType" but none of the other properties of the terminal which should be there are present.

This info is used to restore the terminal so we start working with a terminal which is empty. It makes fail almost everything because almost all the code of pos2 is assming that terminal object is there properly filled.
Steps To Reproduce1. Apply Patch (attached)
2. open erp and unlink your terminal
3. clear cache
4. Open POS
5. link your terminal and login
6. Login will be performed but at some point an error will appear on your screen. After accept login window will be shown
7. Enter user and password and login again
8. error -> Cannot read properties of undefined -> chrome enters in an infinite loop which breaks chrome
TagsNo tags attached.
Attached Filesdiff file icon find_reproducer.diff [^] (1,585 bytes) 2022-12-22 17:21 [Show Content]
png file icon Selection_1161.png [^] (29,599 bytes) 2022-12-22 17:51

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0050588 closedmeriem_azaf Error shown in POS2 after updating the application 

-  Notes
(0145183)
hgbot (developer)
2023-01-05 13:25

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1443 [^]
(0145184)
hgbot (developer)
2023-01-05 13:29

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/953 [^]
(0145221)
hgbot (developer)
2023-01-09 18:51

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 76fbb536794ca612a0a0b474b1414efe41484011
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 05-01-2023 15:42:18
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/76fbb536794ca612a0a0b474b1414efe41484011 [^]

Fixes ISSUE-51234: Cannot read properties of undefined (find) -> infinite loop and chrome crashes

Once an error is raised in the initialitation sequence the terminal becomes unusable and creates an infinite loop which finally consumes all the memory and makes chrome crash.

The problem was, on login, terminal info is loaded after completing the master data load so after the user is sent back to the login screen before terminal data is loaded so the terminal info is not loaded also.

To fix this, when there is a failure on an updateFunction after doing a master data refresh, we have to ensure next time user logs in the master data load is run again OB.UTIL.localStorage.removeItem('MasterdataLastTotalRefresh') and OB.UTIL.localStorage.removeItem('MasterdataLastIncrementalRefresh');

---
M web-jspack/org.openbravo.core2/src/core/ConfigurationSet.js
M web-jspack/org.openbravo.core2/src/core/Registry.js
---
(0145222)
hgbot (developer)
2023-01-09 18:51

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/953 [^]
(0145223)
hgbot (developer)
2023-01-09 18:52

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 3b9c182bfb1011dfaf14595130a34a13fd653d1e
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 09-01-2023 17:49:13
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/3b9c182bfb1011dfaf14595130a34a13fd653d1e [^]

Fixes ISSUE-51234: Cannot read properties of undefined (find) -> infinite loop and chrome crashes

Once an error is raised in the initialitation sequence the terminal becomes unusable and creates an infinite loop which finally consumes all the memory and makes chrome crash.

The problem was, on login, terminal info is loaded after completing the master data load so after the user is sent back to the login screen before terminal data is loaded so the terminal info is not loaded also.

To fix this, when there is a failure on an updateFunction after doing a master data refresh, we have to ensure next time user logs in the master data load is run again OB.UTIL.localStorage.removeItem('MasterdataLastTotalRefresh') and OB.UTIL.localStorage.removeItem('MasterdataLastIncrementalRefresh');

---
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/ReturnBlindTicket.js
---
(0145224)
hgbot (developer)
2023-01-09 18:52

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1443 [^]

- Issue History
Date Modified Username Field Change
2022-12-22 17:21 guilleaer New Issue
2022-12-22 17:21 guilleaer Assigned To => Triage Platform Base
2022-12-22 17:21 guilleaer File Added: find_reproducer.diff
2022-12-22 17:21 guilleaer Triggers an Emergency Pack => No
2022-12-22 17:51 guilleaer File Added: Selection_1161.png
2022-12-23 10:20 jarmendariz Relationship added related to 0050588
2022-12-30 09:29 AugustoMauch Assigned To Triage Platform Base => meriem_azaf
2022-12-30 09:29 AugustoMauch Status new => scheduled
2023-01-05 13:25 hgbot Note Added: 0145183
2023-01-05 13:29 hgbot Note Added: 0145184
2023-01-09 18:51 hgbot Resolution open => fixed
2023-01-09 18:51 hgbot Status scheduled => closed
2023-01-09 18:51 hgbot Fixed in Version => 23Q1
2023-01-09 18:51 hgbot Note Added: 0145221
2023-01-09 18:51 hgbot Note Added: 0145222
2023-01-09 18:52 hgbot Note Added: 0145223
2023-01-09 18:52 hgbot Note Added: 0145224


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker