Blazor WebAssembly PWA not working offline anymore #1874

Closed
opened 2026-01-29 17:59:40 +00:00 by claunia · 4 comments
Owner

Originally created by @SoulBodyExperience on GitHub (Sep 27, 2025).

I recently noticed that my Blazor App doesn't work anymore when started offline. The service-worker can't be registered: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://XXX.azurewebsites.net/') with script ('https://XXX.azurewebsites.net/service-worker.js'): An unknown error occurred when fetching the script.

It took me a while to find out it has to do with the Radzen.Blazor Package: Creating the Visual Studio Standalone WebAssembly Project with PWA support and sample pages -> works fine. Just adding the Radzen.Blazor Package (without using any components or any other reference into the package) is causing the problem.

At some stage in the past it was working, probably still in May.

I suspect a static content is causing the problem, interfering with the service worker.

(I just checked Radzen.Blazor Version 6.5.2. (April 25), it was still working then)

Version 7.4.0 is working, 7.4.1 and latest 7.4.2. not working.

Originally created by @SoulBodyExperience on GitHub (Sep 27, 2025). I recently noticed that my Blazor App doesn't work anymore when started offline. The service-worker can't be registered: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://XXX.azurewebsites.net/') with script ('https://XXX.azurewebsites.net/service-worker.js'): An unknown error occurred when fetching the script. It took me a while to find out it has to do with the Radzen.Blazor Package: Creating the Visual Studio Standalone WebAssembly Project with PWA support and sample pages -> works fine. Just adding the Radzen.Blazor Package (without using any components or any other reference into the package) is causing the problem. At some stage in the past it was working, probably still in May. I suspect a static content is causing the problem, interfering with the service worker. (I just checked Radzen.Blazor Version 6.5.2. (April 25), it was still working then) Version 7.4.0 is working, 7.4.1 and latest 7.4.2. not working.
Author
Owner

@enchev commented on GitHub (Sep 29, 2025):

There is only one commit between 7.4.0 and 7.4.1 and I don't think that It's related to your problem at all:
0b97853a57

@enchev commented on GitHub (Sep 29, 2025): There is only one commit between 7.4.0 and 7.4.1 and I don't think that It's related to your problem at all: https://github.com/radzenhq/radzen-blazor/commit/0b97853a5771a76583b337b53af826341df6c437
Author
Owner

@SoulBodyExperience commented on GitHub (Sep 29, 2025):

Thank you for the response.

I reproduced it again:

Creating Blazor WebAssembly Standalone in Visual Studio, with PWA and sample pages activated.

Adding dependency to Radzen.Blazor 7.4.1.

Publishing on Azure: https://rb-pwa-test741.azurewebsites.net/

Starting works fine. Then in Edge: More Tools, Apps, Installing as an App. Closing the window.

Switching off Internet connection. Then start the app offline -> Error

In Developer consoler there are several errors, including: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://rb-pwa-test741.azurewebsites.net/') with script ('https://rb-pwa-test741.azurewebsites.net/service-worker.js'): An unknown error occurred when fetching the script."

Trying to start the app again results in displaying You are Offline


Then downgrading the dependency to Radzen.Blazor 7.4.0. Publishing to Azure: https://rb-pwa-test740.azurewebsites.net/

Starting works fine. Then in Edge: More Tools, Apps, Installing as an App. Closing the window.

Switching off Internet connection. Then start the app offline -> Working Fine.


Please note that I am very happy with version 7.4.0. I am not actively working on the project. Just updating dependencies last week. No urgency at all.

I know it probably doesn't help much, but I will keep above mentioned Azure Services online for reference until next week.

Version 7.4.3 also not working.

I tried above links with Samsung Internet Browser on Android mobile phone, similiar behavior: 7.4.0 working offline, but 7.4.1 not working offline (without error message, but doesn't finish loading).

@SoulBodyExperience commented on GitHub (Sep 29, 2025): Thank you for the response. I reproduced it again: Creating Blazor WebAssembly Standalone in Visual Studio, with PWA and sample pages activated. Adding dependency to Radzen.Blazor 7.4.1. Publishing on Azure: https://rb-pwa-test741.azurewebsites.net/ Starting works fine. Then in Edge: More Tools, Apps, Installing as an App. Closing the window. Switching off Internet connection. Then start the app offline -> Error In Developer consoler there are several errors, including: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://rb-pwa-test741.azurewebsites.net/') with script ('https://rb-pwa-test741.azurewebsites.net/service-worker.js'): An unknown error occurred when fetching the script." Trying to start the app again results in displaying You are Offline ----------- Then downgrading the dependency to Radzen.Blazor 7.4.0. Publishing to Azure: https://rb-pwa-test740.azurewebsites.net/ Starting works fine. Then in Edge: More Tools, Apps, Installing as an App. Closing the window. Switching off Internet connection. Then start the app offline -> Working Fine. ------------ Please note that I am very happy with version 7.4.0. I am not actively working on the project. Just updating dependencies last week. No urgency at all. I know it probably doesn't help much, but I will keep above mentioned Azure Services online for reference until next week. Version 7.4.3 also not working. I tried above links with Samsung Internet Browser on Android mobile phone, similiar behavior: 7.4.0 working offline, but 7.4.1 not working offline (without error message, but doesn't finish loading).
Author
Owner

@enchev commented on GitHub (Oct 3, 2025):

Just tested PWA with latest version and it worked normally:

Image Image
@enchev commented on GitHub (Oct 3, 2025): Just tested PWA with latest version and it worked normally: <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/9001f870-2482-40ac-ba2f-ddc7215c051d" /> <img width="1323" height="805" alt="Image" src="https://github.com/user-attachments/assets/1743a942-e2c2-4ad6-baab-df40a6334691" />
Author
Owner

@SoulBodyExperience commented on GitHub (Oct 4, 2025):

Thank you !

On Sat, 4 Oct 2025, 12:44 am Vladimir Enchev, @.***>
wrote:

enchev left a comment (radzenhq/radzen-blazor#2303)
https://github.com/radzenhq/radzen-blazor/issues/2303#issuecomment-3365378614

Just tested PWA with latest version and it worked normally:
image.png (view on web)
https://github.com/user-attachments/assets/9001f870-2482-40ac-ba2f-ddc7215c051d image.png
(view on web)
https://github.com/user-attachments/assets/1743a942-e2c2-4ad6-baab-df40a6334691


Reply to this email directly, view it on GitHub
https://github.com/radzenhq/radzen-blazor/issues/2303#issuecomment-3365378614,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BJRF3OERZ2OIDIF4RU5UZF33VZORVAVCNFSM6AAAAACHUUF2GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRVGM3TQNRRGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

@SoulBodyExperience commented on GitHub (Oct 4, 2025): Thank you ! On Sat, 4 Oct 2025, 12:44 am Vladimir Enchev, ***@***.***> wrote: > *enchev* left a comment (radzenhq/radzen-blazor#2303) > <https://github.com/radzenhq/radzen-blazor/issues/2303#issuecomment-3365378614> > > Just tested PWA with latest version and it worked normally: > image.png (view on web) > <https://github.com/user-attachments/assets/9001f870-2482-40ac-ba2f-ddc7215c051d> image.png > (view on web) > <https://github.com/user-attachments/assets/1743a942-e2c2-4ad6-baab-df40a6334691> > > — > Reply to this email directly, view it on GitHub > <https://github.com/radzenhq/radzen-blazor/issues/2303#issuecomment-3365378614>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BJRF3OERZ2OIDIF4RU5UZF33VZORVAVCNFSM6AAAAACHUUF2GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRVGM3TQNRRGQ> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1874