HTTP errors getting cached on Angular app on Android Chrome

Viewed 175

We have an Angular app running with service worker (mainly for notification support).

Recently we've been getting complaints from a small number of users that the web app doesn't load for them on Chrome Android and they get 502 HTTP error. It seems to be caching that error, as reloading does not do anything.

But the error goes away when we ask them to clear the cookies and we aren't able to reproduce their error in our devices. All complaints are coming from Android only - not desktop and not iOS.

Angular 12 with @angular/PWA (https://www.fantrax.com/ngsw-worker.js)

The app is available at https://fantrax.com/

1 Answers

As you know, firstly caching behavior comes from the service worker. I always disable service workers for an ongoing project, otherwise, you have to clear every thing or perform a hard refresh (using Ctrl + F5) to see/make the changes. So, It's hard to debug a project with an active service worker. Then, try to find the errors perhaps by some tests like e2e to automate the process. As an example, If you try to activate the push behavior using a google chrome developer tools, you will see an error raised from ngsw-worker.js which is unexpected.

Related