MJPEG Stream Not Loading in Safari Due to Service Worker Issue

Hi,

I’m using Home Assistant 2023.9.3 (running HAOS 10.5) and have installed the NGINX Home Assistant SSL proxy add-on to access HA via HTTPS. This is working fine, except that in Safari (v. 17.0), the MJPEG camera stream won’t load. It’s working fine in Chrome though.

The issue seems to be related to HA’s service worker. In Safari’s private browsing mode, in which service workers aren’t executed, it is working fine. Same without HTTPS, which also bypasses the service worker.

When I go to Develop › Service Workers › myhostname.example.com in a non-private window, I see the following error:

[Error] Failed to load resource: the server responded with a status of 403 () (camera.doorbird_mjpeg, line 0)
[Error] Unhandled Promise Rejection: NetworkError:  A network error occurred. (x3)

However, if I open the same stream URL in Chrome or pull it via curl, it works.

I’ll probably create a bug report on GitHub, but wanted to check here first if anybody else is seeing this and if there are known workarounds. I could imagine using the reverse proxy to prevent the service worker from registering, but maybe there is a better approach.

Thanks!

I also currently have this issue. Were you able to report a bug or find a solution?

I didn’t find a solution and “solved” it by using the Home Assistant app instead, which doesn’t have this bug. I didn’t create a bug report on GitHub yet.

I now created a bug report here: MJPEG Stream Not Loading in Safari Due to Service Worker Issue · Issue #19913 · home-assistant/frontend · GitHub

1 Like