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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049928
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] Coremajorhave not tried2022-08-01 14:142022-08-03 14:28
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
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

0049928: State persistence errors should be more visible

DescriptionCurrently 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
TagsNo tags attached.
Attached Filesdiff file icon ticketExtraInfo.diff [^] (1,866 bytes) 2022-08-01 14:14 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0139769)
hgbot (developer)
2022-08-01 14:19

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/390 [^]
(0139779)
hgbot (developer)
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 (developer)
2022-08-02 00:14

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/390 [^]
(0139842)
hgbot (developer)
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
---

- 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 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 View Revisions
2022-08-01 14:19 hgbot Note Added: 0139769
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker