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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046960
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajoralways2021-06-01 18:422021-06-02 16:46
Reportergorka_gilView Statuspublic 
Assigned Togorka_gil 
PrioritynormalResolutionfixedFixed in VersionRR21Q2.1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR21Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046960: error when updating sources - pos1

DescriptionServing 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-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0046938 closedgorka_gil error when updating sources - pos1 

-  Notes
(0128954)
hgbot (developer)
2021-06-02 16:26

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 8b8500d1dff7804e9ad78a486d47149213842d9e
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2021-06-02T16:25:22+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/8b8500d1dff7804e9ad78a486d47149213842d9e [^]

Fix ISSUE-46960: 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
---

- Issue History
Date Modified Username Field Change
2021-06-02 13:54 gorka_gil Type defect => backport
2021-06-02 13:54 gorka_gil Target Version => RR21Q2.1
2021-06-02 16:26 hgbot Note Added: 0128954
2021-06-02 16:35 gorka_gil Status scheduled => resolved
2021-06-02 16:35 gorka_gil Resolution open => fixed
2021-06-02 16:36 gorka_gil Fixed in Version => RR21Q3.1
2021-06-02 16:37 gorka_gil Fixed in Version RR21Q3.1 => RR21Q2.1
2021-06-02 16:46 marvintm Review Assigned To => marvintm
2021-06-02 16:46 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker