Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0046961 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Retail Modules] Web POS | major | always | 2021-06-01 18:42 | 2021-06-02 16:47 | |||
Reporter | gorka_gil | View Status | public | |||||
Assigned To | gorka_gil | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR21Q1.3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | RR21Q1.3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | open | |||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0046961: error when updating sources - pos1 | |||||||
Description | Serving in production mode 1. Login pos 2. Update sources and deploy 3. Reload pos -> ERROR: check console Error: Cannot drop database POS_state because request is blocked at IDBOpenDBRequest.<anonymous> | |||||||
Steps To Reproduce | - | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0128956) hgbot (developer) 2021-06-02 16:36 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^] Changeset: acb36da2c580bd617b3a300d98aa153f37de83e8 Author: Gorka Gil <gorka.gil@openbravo.com> Date: 2021-06-02T16:36:03+02:00 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/acb36da2c580bd617b3a300d98aa153f37de83e8 [^] Fixed ISSUE-46961: delete the state on sources update in a better way - pos1 Make use of the api to reset the state It is the more secure way to delete the state, removing a property of localstorage, after the reload, the ram is deleted so the state of the ram is lost. Then it will try to reload the state from disk, but before do that, will check if the localstorage property exists and if not, will delete the disk state db before try to load it. In this way we don't try to delete a running state and there is no race conditions that can cause problems. Other discarded options: a) With indexeddb api, delete the db of the state: const persistenceDB = new OB.App.Class.IndexedDBController('state'); persistenceDB.deleteDatabase().finally(() => { window.location.reload(); }); - Problem: it deletes an db is use, gives an error that can not be deleted, but in any case looks like working, but doesn't look to have the error, also doesn't give security that will work always. Also doesn't ensure that after delete and before the reload the db is saved again --- M web/org.openbravo.mobile.core/source/offline/ob-fetch-manifest.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2021-06-02 13:54 | gorka_gil | Type | defect => backport |
2021-06-02 13:54 | gorka_gil | Target Version | => RR21Q1.3 |
2021-06-02 16:36 | hgbot | Resolution | open => fixed |
2021-06-02 16:36 | hgbot | Status | scheduled => resolved |
2021-06-02 16:36 | hgbot | Fixed in Version | => RR21Q1.3 |
2021-06-02 16:36 | hgbot | Note Added: 0128956 | |
2021-06-02 16:47 | marvintm | Review Assigned To | => marvintm |
2021-06-02 16:47 | marvintm | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |