Openbravo Issue Tracking System - POS2
View Issue Details
0057751POS2Corepublic2025-01-24 11:062025-01-24 17:55
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
25Q125Q1 
approved
No
No
0057751: ServiceWorker update error when doing login offline
If a login offline in POS is performed ("through missing connection/wifi, not devtools"), an error message is shown as follows:
Failed to update a ServiceWorker for scope ("...") with script ("...service-worker.js"): An unknown error occured when fetching the script.
1. Login in POS
2. Logout
3. Stop Wifi or Ethernet
4. Login again in POS

A login offline is performed, but an error message appears related with the service worker.
The service worker should not try to update itself when an offline login has been performed.
No tags attached.
blocks defect 0057750 closed cberner ServiceWorker update error when doing login offline 
Issue History
2025-01-24 12:10cbernerTypedefect => backport
2025-01-24 12:10cbernerTarget Version => 25Q1
2025-01-24 12:14hgbotNote Added: 0174673
2025-01-24 16:59hgbotMerge Request Statusopen => approved
2025-01-24 17:55hgbotNote Added: 0174695
2025-01-24 17:55hgbotResolutionopen => fixed
2025-01-24 17:55hgbotStatusscheduled => closed
2025-01-24 17:55hgbotFixed in Version => 25Q1
2025-01-24 17:55hgbotNote Added: 0174696

Notes
(0174673)
hgbot   
2025-01-24 12:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1735 [^]
(0174695)
hgbot   
2025-01-24 17:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1735 [^]
(0174696)
hgbot   
2025-01-24 17:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 04b8179fd482e5a4cf80de9e791b18861ca1f12f
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 24-01-2025 12:12:20
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/04b8179fd482e5a4cf80de9e791b18861ca1f12f [^]

Fixes ISSUE-57751: ServiceWorker update error when doing login offline

Due to some recent commits, the service worker update was moved outside
of "only online" in the login process, that meant it was trying to
update itself while offline, which will fail. An if statement was added
to only update service worker if we're in online mode.

---
M web-jspack/org.openbravo.core2/src/core/authentication/LoginProcess.js
---