Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050478Retail ModulesWeb POSpublic2022-09-22 16:212022-10-11 12:55
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
RR22Q4.1RR22Q4 
No
0050478: State compression on occasions breaks the state on deployed pos2
If we refresh pos2 without any previous state and no data of the application, it breaks with the following error continuously appearing in the terminal:
TypeError: Cannot read properties of undefined (reading 'length')
    at Object.checkMaximumNumberEventsPerMessage (POS2.js:16745:30)

If we take a look at the state after this happens, we encounter a state that is semi-compressed, and this seems to be the thing that's generating that error. It is not very clear what is causing it, for now we know is not the service workers, as this also happens on locally node deployed pos2.

Check the attached screenshot and video for more details.
1. Go to pos2 in livebuilds: https://livebuilds.openbravo.com/retail_pos2_pgsql/web/pos/?terminal=VBS-2 [^]
2. Open developer tools in chrome, and go to tab "Application"
3. Click on the left, click on Storage, and then on the button "Clear site data"

Refresh the web, you should reproduce the problem. Check the attached gif for extra info.
No tags attached.
blocks defect 0050314 closed cberner POS2 State compression on occasions breaks the state on deployed pos2 
Issue History
2022-10-11 12:24cbernerTypedefect => backport
2022-10-11 12:24cbernerTarget Version => 22Q4.1
2022-10-11 12:26cbernerProjectPOS2 => Retail Modules
2022-10-11 12:27cbernerCategoryCore => Web POS
2022-10-11 12:27cbernerTarget Version22Q4.1 =>
2022-10-11 12:28cbernerTarget Version => RR22Q4.1
2022-10-11 12:30hgbotNote Added: 0141955
2022-10-11 12:55hgbotResolutionopen => fixed
2022-10-11 12:55hgbotStatusscheduled => closed
2022-10-11 12:55hgbotFixed in Version => RR22Q4
2022-10-11 12:55hgbotNote Added: 0141958
2022-10-11 12:55hgbotNote Added: 0141959

Notes
(0141955)
hgbot   
2022-10-11 12:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/420 [^]
(0141958)
hgbot   
2022-10-11 12:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: a57e319626f073258e3309db895d192c1c6b24f4
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 11-10-2022 10:55:32
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/a57e319626f073258e3309db895d192c1c6b24f4 [^]

Fixes ISSUE-50478: State persistence compression breaks in occasions on pos2

---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---
(0141959)
hgbot   
2022-10-11 12:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/420 [^]