[fixed] Offline Functionality Broken! BUGS? - unhandled runtime error

I’m developing a mobile app using the offline functionality.

I noticed recently that the offline functionality that used to work is now causing an

“unhandled runtime error”

I checked to see if I had code that didn’t check

anvil.server.is_app_online()

But everything looks ok So I checked the sample app from the docs https://anvil.works/docs/server/offline-apps

That appears to have the same issue.

It occurs when the app is starting up when offline - if the app is open and goes offline it functions correctly but if you reload or launch the app whilst offline it triggers the unhandled runtime error.

I came across some simliar posts from August/September but I’m not sure if they’re related:

https://anvil.works/forum/t/sudden-unhandled-runtime-errors-for-pwa-offline-behavior/14016

https://anvil.works/forum/t/unhandled-runtime-error-when-leaving-an-app-open-overnight/14261

They mention a workaround being custom error handling but I am extremely nervous of going forward with my project without a better understanding of what is going wrong.

This did not happen when the offline functionality was first released!

Offline functionality is core to my app.

Any help or advice would be greatly appreciated.

1 Like

I’m guessing you are using PWA’s, do you know what browser they are being opened / created with / in ?

I don’t know the answer but I am just guessing that info might help someone who does.

Yes its a PWA using Chrome.

Result is the same for both Desktop and Mobile.

This was linked to the other posts mentioned and has now been fixed.

2 Likes