iOS icon indicating copy to clipboard operation
iOS copied to clipboard

Pauses playing media when opening home assistant app.

Open JoeyGE0 opened this issue 10 months ago • 26 comments

iOS device model, version and app version

Model Name: iPhone 14 Pro Software Version: iOS 26.3 (23D5103D) App version: 2026.1.1 (2026.1652)

Home Assistant Core Version

Core 2026.2.0b1

Supervisor 2026.01.1

Operating System 17.0

Describe the bug When the home assistant app is opened from cold (after being forced to quit by swiping or not using for a period of time) once application opens it pauses media playback from services such as Spotify. To Reproduce Open the application from clean start on iPhone with media playing in background. Expected behavior Media will pause unexpectedly. You will need to click the play button and return to the app and it will continue to work unless the app is cleared. Screenshots

Additional context Yes, I'm running on a few betas but I've tested this on stable versions of iOS and home assistant builds. The issues has bugged me for awhile now.

JoeyGE0 avatar Jan 31 '26 22:01 JoeyGE0

+1

I’ve encountered this behavior when switching back to the app after it has been in the background for a while (presumably long enough to have closed connections). Cold start up not required.

bobbeims avatar Mar 09 '26 12:03 bobbeims

Can you check if you have the "Audio output" sensor enabled? And if so, can you check if deactivating it helps?

bgoncal avatar Mar 11 '26 10:03 bgoncal

Yes, the audio output sensor was enabled. I disabled it, killed the app, restarted it while listening to a podcast, and the playback stopped.

bobbeims avatar Mar 11 '26 14:03 bobbeims

Ok thanks, I'll keep digging then.

Does the same happen if you server is unreachable? Like... when you can't access your server (no internet or other reason) does it also stops the audio?

bgoncal avatar Mar 11 '26 15:03 bgoncal

I downloaded a podcast, started playing, turned on airplane mode, launched the companion app and the audio continued playing.

When I turned airplane mode off, and pulled down to refresh the app page, the default page loaded and audio stopped.

bobbeims avatar Mar 11 '26 16:03 bobbeims

Ok, then we are making some progress, it looks like the issue may be coming from the app WebView that loads the frontend web page. Do you see such behavior happening in iOS Safari, chrome etc?

bgoncal avatar Mar 11 '26 17:03 bgoncal

I started playback with Music (macOS Tahoe 26.3.1), then opened http://homeassistant.local:8123/room-dashboards/ in Safari ... music did not stop.

bobbeims avatar Mar 11 '26 23:03 bobbeims

But the issue only happens in iOS right?

bgoncal avatar Mar 12 '26 07:03 bgoncal

That’s the only place I’ve experienced it.

This morning I had a news app playing in PiP mode while using the companion app on my iPad. I did a refresh on a dashboard that wasn’t loading (by swiping down and releasing) and the playback stopped when the dashboard loaded.

bobbeims avatar Mar 12 '26 13:03 bobbeims

Ok, then we are making some progress, it looks like the issue may be coming from the app WebView that loads the frontend web page. Do you see such behavior happening in iOS Safari, chrome etc?

Thank you for looking into this for us. Looks like I'm not the only one! Yes it seems to be related to the companion app as it does not seem to happen when loading in a plain browser

JoeyGE0 avatar Mar 20 '26 10:03 JoeyGE0

Same happens when iPhone connected to CarPlay- music/podcast stops playing immediately.

olegjdn-maker avatar Mar 20 '26 19:03 olegjdn-maker

Can we get it fixed soon? The issue is not new. And it's super annoying.

The OP was created at the end of Jan. I wrote a post on the HA forum in the middle of Dec'25, having already experienced it for some time. It's either iOS26 related or has been introduced with some version of the app in Autumn.

michal-bartak avatar Apr 07 '26 11:04 michal-bartak

I don't know if this will fix the issue completely since I cannot reliably reproduce it https://github.com/home-assistant/iOS/pull/4482

bgoncal avatar Apr 07 '26 11:04 bgoncal

Thank you for the quick response. How can we test that? when will be available for testflight?

michal-bartak avatar Apr 07 '26 17:04 michal-bartak

Sorry it shouldn't have auto-resolved the issue. I have reopened it.

I'll prepare a new TestFlight build tomorrow or on Thursday.

bgoncal avatar Apr 07 '26 18:04 bgoncal

I just found new version on testflight (2026.4.1 - 1873) with this issue fix mentioned.

Unfortunatelly it remains not fixed. Note, that to trigger the issue, it's not enough to bring HA to the front. HA has to initialize, like after the app kill. See video

https://github.com/user-attachments/assets/7c9924b7-b245-49d7-9b17-94ce11b9f437

with regards

michal-bartak avatar Apr 08 '26 22:04 michal-bartak

Thanks for letting me know, I'll keep digging then, unfortunately as you can see in my video, the same does not happen on my devices so keep bringing more information here in case you can think about something different on your setup https://github.com/user-attachments/assets/7300377d-1cac-43cc-b7f1-9e5bb9a6c698

bgoncal avatar Apr 09 '26 09:04 bgoncal

Your video is without sound ;)

Anyway let me know how can I help you, and I will do my best. Maybe it depends on integrations active? Maybe custom integrations? Maybe browser mod? I don't lknow how to list it all

michal-bartak avatar Apr 09 '26 11:04 michal-bartak

@michal-bartak Not sure why the video does not contain the music, but it was still playing, I tapped the dynamic island to show it was not paused.

Can you start your home assistant in safe mode and try again?

bgoncal avatar Apr 09 '26 11:04 bgoncal

Can you start your home assistant in safe mode and try again?

I would like to avoid that.

michal-bartak avatar Apr 09 '26 11:04 michal-bartak