Openbravo Issue Tracking System - POS2 |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0050846 | POS2 | Core | public | 2022-11-10 13:21 | 2022-11-14 16:51 |
|
Reporter | cberner | |
Assigned To | cberner | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 22Q4.1 | Fixed in Version | 22Q4.1 | |
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 | 0050846: On occasions service worker doesn't properly use the updated files |
Description | It seems on occasions, there is a reload of the application when a new version of the builds is present and the files being used after the refresh are the same as the old version, another refresh is required for this to be fixed afterwards.
The main problem seems to be that the reload of the application could generate a race condition with the activation of the new service worker, we should refresh only afterwards. |
Steps To Reproduce | 1. Apply this diff serviceWorker.diff attached, it adds a setTimeout on the processing of the skipWaiting message of the service worker
2. Run ant build in core2
3. Start Tomcat server, and use the production build: localhost:8080/openbravo/web/pos
4. Modify the service-worker.js file in WebContent/web/pos/static to generate a new update, you can modify one of the .chunk.js files to see which one is the web page currently using
After modification, refresh the webpage, check that we're still using the older version, instead of the new one. You can check this by looking in dev-tools at the Sources tab, check the files that you modified and updated the version. |
Proposed Solution | Refresh the application on service worker activation, after the messages has been properly created. |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | defect | 0050836 | | closed | cberner | On occasions service worker doesn't properly use the updated files |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2022-11-10 16:45 | guilleaer | Type | defect => backport |
2022-11-10 16:45 | guilleaer | Target Version | => 22Q4.1 |
2022-11-14 16:03 | hgbot | Note Added: 0143581 | |
2022-11-14 16:51 | hgbot | Merge Request Status | open => approved |
2022-11-14 16:51 | hgbot | Resolution | open => fixed |
2022-11-14 16:51 | hgbot | Status | scheduled => closed |
2022-11-14 16:51 | hgbot | Fixed in Version | => 22Q4.1 |
2022-11-14 16:51 | hgbot | Note Added: 0143585 | |
2022-11-14 16:51 | hgbot | Note Added: 0143588 | |