Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0046831 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] Core | major | have not tried | 2021-05-25 15:59 | 2021-06-02 12:43 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | gorka_gil | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
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 | 0046831: error when updating sources | |||||||
Description | When sources are updated state database is deleted, this step throws an error that can be seen in console. | |||||||
Steps To Reproduce | Serving in production mode 1. Login pos2 2. Update sources and deploy the production bundle 3. Reload pos2 -> ERROR: check console POS2.js:3247 Error: Cannot drop database POS2_state because request is blocked at IDBOpenDBRequest.<anonymous> (http://localhost:8181/openbravo/web/pos/static/js/12.3c2e1da5.chunk.js:1:101307 [^]); line: Ee (0.92304dcb.chunk.js:1) (*) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||||||||||||
|
![]() |
|
(0128825) hgbot (developer) 2021-05-31 19:57 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/528 [^] |
(0128857) hgbot (developer) 2021-06-01 13:25 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: 6a29db215e1e5701bf84c7239c36593816b12dd6 Author: Gorka Gil <gorka.gil@openbravo.com> Date: 2021-06-01T12:16:15+02:00 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/6a29db215e1e5701bf84c7239c36593816b12dd6 [^] Fix ISSUE-46831: delete the state on sources update in a better way 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 b) Purge db with localforage api: OB.App.State.getPersistence().stateStorePersistor.purge() It can be used since a recent change that ensures that state is started before the check of sources. - Problem: It works on F5, but not in logut/login not clear why. c) New state action that clear the state: Tested but looks like is not working, not clear why but the state is not reset maybe some protection in the code. In any case will probably launch the listeners of the state, and since all the spected variables are not there very probably will produce errors. --- M web-jspack/org.openbravo.core2/src/registerServiceWorker.js --- |
(0128858) hgbot (developer) 2021-06-01 13:25 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/528 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2021-05-25 15:59 | alostale | New Issue | |
2021-05-25 15:59 | alostale | Assigned To | => Retail |
2021-05-25 15:59 | alostale | OBNetwork customer | => No |
2021-05-25 15:59 | alostale | Triggers an Emergency Pack | => No |
2021-05-25 16:00 | alostale | Relationship added | related to 0046498 |
2021-05-25 16:01 | alostale | Resolution time | => 1623708000 |
2021-05-26 07:10 | alostale | Assigned To | Retail => platform |
2021-05-26 07:10 | alostale | Status | new => acknowledged |
2021-05-28 13:17 | alostale | Assigned To | platform => gorka_gil |
2021-05-28 13:17 | alostale | Issue Monitored: alostale | |
2021-05-28 22:19 | guilleaer | Status | acknowledged => scheduled |
2021-05-31 19:57 | hgbot | Merge Request Status | => open |
2021-05-31 19:57 | hgbot | Note Added: 0128825 | |
2021-06-01 13:24 | hgbot | Merge Request Status | open => approved |
2021-06-01 13:25 | hgbot | Note Added: 0128857 | |
2021-06-01 13:25 | hgbot | Note Added: 0128858 | |
2021-06-01 18:44 | gorka_gil | Relationship added | related to 0046938 |
2021-06-02 12:43 | alostale | Status | scheduled => resolved |
2021-06-02 12:43 | alostale | Resolution | open => fixed |
2021-06-02 12:43 | alostale | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |