blazor application can not run at offline specfically in firefox browser

ramesh P 0 Reputation points
2024-05-23T14:33:01.3066667+00:00

I had devlop the blazorWASM application with indexedDb. I had implement service worker for offline application WIth PWA also. Offline working successfully in chrome and edge browser but firefox not working i got the error while debugging that error is

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable

blazor_error_2_optimized_2500

InvalidStateError realted indexeddb. Indexeddb object not properly intalized at offline i think thats why when saw the indexedb on browser shows the error like image

Service worker runing when application open then after serve caches resources to client service worker stopped. when i was try to run application offline i got the InvalidStateError message

please help me. thanks

I had used blazorindexedb package for deveop the application

https://github.com/nwestfall/BlazorDB

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,460 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
914 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,546 Reputation points
    2024-05-23T18:38:30.57+00:00

    you don't show your service worker code, but I'd guess that there is not an active connection to the indexdb (you failed to call indexDB.open() at the start of the query).