Openbravo Issue Tracking System - POS2 |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0049928 | POS2 | Core | public | 2022-08-01 14:14 | 2022-08-03 14:28 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
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 | 0049928: State persistence errors should be more visible |
Description | Currently is there is an error when persisting the state, the error is not logged anywhere. Persistence errors are very severe because they can lead to other issues, so whenever an error occurs we should make sure it is included in the terminal log with some information that might help to understand why the persistence failed. |
Steps To Reproduce | - Install the patch attached. It will add a state action that allows to add additional information to the ticket.
- Open WebPOS, open the developer tools
- In the console, create a big string: bigData = 'x'.repeat(5*1024*1024)
- Assign the big string to the state using the new state action: OB.App.State.Ticket.setTicketExtraInfo({extraInfo: bigData}). There will be an error because the state cannot be persisted but it will not be logged in the terminal log |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | ticketExtraInfo.diff (1,866) 2022-08-01 14:14 https://issues.openbravo.com/file_download.php?file_id=17360&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2022-08-01 14:14 | AugustoMauch | New Issue | |
2022-08-01 14:14 | AugustoMauch | Assigned To | => AugustoMauch |
2022-08-01 14:14 | AugustoMauch | OBNetwork customer | => No |
2022-08-01 14:14 | AugustoMauch | Triggers an Emergency Pack | => No |
2022-08-01 14:14 | AugustoMauch | File Added: ticketExtraInfo.diff | |
2022-08-01 14:14 | AugustoMauch | Project | Retail Modules => POS2 |
2022-08-01 14:15 | AugustoMauch | Status | new => scheduled |
2022-08-01 14:17 | AugustoMauch | Category | Web POS => Core |
2022-08-01 14:17 | AugustoMauch | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=24572#r24572 |
2022-08-01 14:19 | hgbot | Merge Request Status | => open |
2022-08-01 14:19 | hgbot | Note Added: 0139769 | |
2022-08-01 15:22 | hgbot | Merge Request Status | open => approved |
2022-08-02 00:14 | hgbot | Resolution | open => fixed |
2022-08-02 00:14 | hgbot | Status | scheduled => closed |
2022-08-02 00:14 | hgbot | Fixed in Version | => RR22Q4 |
2022-08-02 00:14 | hgbot | Note Added: 0139779 | |
2022-08-02 00:14 | hgbot | Note Added: 0139780 | |
2022-08-03 14:28 | hgbot | Fixed in Version | RR22Q4 => RR22Q3 |
2022-08-03 14:28 | hgbot | Note Added: 0139842 | |
Notes |
|
(0139769)
|
hgbot
|
2022-08-01 14:19
|
|
|
|
(0139779)
|
hgbot
|
2022-08-02 00:14
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 8246c59e6f8eebe3eaf124da4a32bfe426686bb2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 02-08-2022 00:14:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/8246c59e6f8eebe3eaf124da4a32bfe426686bb2 [^]
Fixes ISSUE-49928: Persistence errors are now included in the terminal log
Now whenever there is a persistence error it will be logged in the terminal log, including the current size of the state and the current size of the local storage. For instance:
ERROR PERSISTING DATA: QuotaExceededError: Failed to execute setItem on Storage: Setting the value of POS2_state/State/persist:root exceeded the quota.. localStorage use: [{"k":"POS2.services","s":19568},{"k":"POS2.masterDataHashes","s":11587},{"k":"POS2.processes","s":10541},{"k":"POS2_state/State/persist:root","s":9950},{"k":"POS2.backendMasterDataHashes","s":5830},{"k":"POS2.terminalSchedule","s":1646},{"k":"POS2.AppFormat","s":664},{"k":"POS2.HWM.VBS-2.2","s":34},{"k":"POS2.HWM.VBS-2.1","s":34},{"k":"POS2.HWM.VBS-2.0","s":34}]. current state use: [{"k":"Ticket","s":5247092},{"k":"UI","s":19718},{"k":"Configuration","s":4937},{"k":"Cashup","s":1728},{"k":"TerminalLog","s":1393},{"k":"DocumentSequence","s":708},{"k":"RemoteServer","s":460},{"k":"Session","s":144},{"k":"Setting","s":81},{"k":"_persist","s":32}]; stackTrace: http://localhost:8080/openbravo/web/pos/static/js/6.576efc4b.chunk.js:1:101069\; [^]
writeFailHandler (http://localhost:8080/openbravo/web/pos/static/js/6.576efc4b.chunk.js:1:101451 [^]);
_ (http://localhost:8080/openbravo/web/pos/static/js/5.bc43fc85.chunk.js:2:61352 [^])
---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---
|
|
|
(0139780)
|
hgbot
|
2022-08-02 00:14
|
|
|
|
(0139842)
|
hgbot
|
2022-08-03 14:28
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 025be97b8188436bc554c6fa8a661dcf723227d3
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-08-2022 14:28:14
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/025be97b8188436bc554c6fa8a661dcf723227d3 [^]
Fixes ISSUE-49928: Persistence errors are now included in the terminal log
Now whenever there is a persistence error it will be logged in the terminal log, including the current size of the state and the current size of the local storage. For instance:
ERROR PERSISTING DATA: QuotaExceededError: Failed to execute setItem on Storage: Setting the value of POS2_state/State/persist:root exceeded the quota.. localStorage use: [{"k":"POS2.services","s":19568},{"k":"POS2.masterDataHashes","s":11587},{"k":"POS2.processes","s":10541},{"k":"POS2_state/State/persist:root","s":9950},{"k":"POS2.backendMasterDataHashes","s":5830},{"k":"POS2.terminalSchedule","s":1646},{"k":"POS2.AppFormat","s":664},{"k":"POS2.HWM.VBS-2.2","s":34},{"k":"POS2.HWM.VBS-2.1","s":34},{"k":"POS2.HWM.VBS-2.0","s":34}]. current state use: [{"k":"Ticket","s":5247092},{"k":"UI","s":19718},{"k":"Configuration","s":4937},{"k":"Cashup","s":1728},{"k":"TerminalLog","s":1393},{"k":"DocumentSequence","s":708},{"k":"RemoteServer","s":460},{"k":"Session","s":144},{"k":"Setting","s":81},{"k":"_persist","s":32}]; stackTrace: http://localhost:8080/openbravo/web/pos/static/js/6.576efc4b.chunk.js:1:101069\; [^]
writeFailHandler (http://localhost:8080/openbravo/web/pos/static/js/6.576efc4b.chunk.js:1:101451 [^]);
_ (http://localhost:8080/openbravo/web/pos/static/js/5.bc43fc85.chunk.js:2:61352 [^])
---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---
|
|