Setting app icon when installing CHT as a PWA (Windows)

Sorry about the late reply! For some reason I didn’t get the notification…

Given that there’s only two icons listed my guess is that the favicon is wrong, and Windows is switching to the larger (correct) icon when it gets big enough. Favicons are tricky because they’re aggressively cached by browsers so it could be some issue like that.

To look into the problem I went to /favicon.ico without logging in but the request isn’t completing. On a hunch I checked the logs and haproxy is reporting a 404 for the icon file /medic/branding/kamuzu-central-favi.ico.

This indicates that your ico file isn’t available, which I suspect will be fixable in configuration. It could indicate an issue in cht-conf or in the way your config is structured. Right now I suspect you’ll be getting a lot of errors in the log because browsers will automatically try and fetch the favicon. Try and fix that so /favicon.ico actually responds with your file and that may fix your PWA issue too.

There’s also a bug in cht-core where haproxy returns a 404 but it isn’t caught by API so it falls back to “unhandled rejection” and doesn’t respond to the client. I’ve raised an issue to get it fixed separately.

1 Like