home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.55k stars 302 forks source link

Home Assistant Companion on macOS randomly opens on its own #2394

Open adamfeldman opened 1 year ago

adamfeldman commented 1 year ago

Device model, version and app version

Model Name: MBP 14" 2021, M1 Max macOS Version: 13.5 App Version: 2023.4 (2023.460) Safari Version: 16.6 (18615.3.12.11.2)

Home Assistant Core Version

2023.8.1 (and numerous prior versions)

Describe the bug

The macOS Companion app will launch itself on my Mac without any action on my part. It is not due to e.g. an incoming notification. I have observed this behavior intermittently for ~months.

Others experiencing the issue: https://community.home-assistant.io/t/how-does-the-mac-app-keep-autostarting/583922 https://community.home-assistant.io/t/how-to-stop-ha-from-opening-automatically-on-macbook-pro/404429 https://community.home-assistant.io/t/macos-app-randomly-launching-itself/559377

To Reproduce

Expected behavior

Screenshots

Additional context

Thank you!

LordMyschkin commented 1 year ago

I second that (MacOS 13.5 via OpenCore legacy patcher on a Non-Retina-Mid2012 MacBookPro 9.1)

mikesalz commented 1 year ago

Not sure if this is related, but I just submitted this "bug" because it always opens on restart.

https://github.com/home-assistant/frontend/issues/17626

ustuehler commented 1 year ago

It seems that usernoted requests launchd to start the Home Assistant companion application. It was stopped since 3:10 PM. Note how the application was launched almost exactly on the next hour.

Screenshot 2023-08-24 at 16 03 40
hmijail commented 1 year ago

FWIW, in my case I narrowed this down to Home Assistant.app being enabled in System Settings / Privacy&Security / Focus. If I disable it there, it stops auto-launching.

Looks like the app gets called by the OS even when it is disabled (or not present!) in the Login/background items pane.

Confusingly, no apps I know for detecting launching hooks (Knock Knock, Lingon X) can detect this. So if this is the actual launch mechanism, sounds to me like a malware problem waiting to happen.

RedNo7 commented 1 year ago

FWIW, in my case I narrowed this down to Home Assistant.app being enabled in System Settings / Privacy&Security / Focus. If I disable it there, it stops auto-launching.

@hmijail Nice! ..that sorted it for me as well đź‘Ť

mikesalz commented 1 year ago

FWIW, in my case I narrowed this down to Home Assistant.app being enabled in System Settings / Privacy&Security / Focus. If I disable it there, it stops auto-launching.

Unfortunately that does not help me. The HA app launches every time I restart my Mac. I only want it to run in the background.

BTW, have any devs addressed this issue? Seems to be ignored...

martindinicolino commented 1 year ago

FWIW, in my case I narrowed this down to Home Assistant.app being enabled in System Settings / Privacy&Security / Focus. If I disable it there, it stops auto-launching.

Unfortunately that does not help me. The HA app launches every time I restart my Mac. I only want it to run in the background.

BTW, have any devs addressed this issue? Seems to be ignored...

same here, it would be great if this issue could be addressed

s1ckopsycho commented 12 months ago

FWIW, in my case I narrowed this down to Home Assistant.app being enabled in System Settings / Privacy&Security / Focus. If I disable it there, it stops auto-launching.

Model Name: MBP 13" 16GB 2021, M1 Max macOS Version: 14.1 Sonoma Beta (23B5056e) App Version:Removed companion app Safari Version: 16.6 (18615.3.12.11.2)

Home Assistant Core Version

2023.8.1 (and numerous prior versions)

Describe the bug

The macOS Companion app will launch itself on my Mac without any action on my part. It is not due to e.g. an incoming notification. I have observed this behavior intermittently for ~months.

Others experiencing the issue: https://community.home-assistant.io/t/how-does-the-mac-app-keep-autostarting/583922 https://community.home-assistant.io/t/how-to-stop-ha-from-opening-automatically-on-macbook-pro/404429 https://community.home-assistant.io/t/macos-app-randomly-launching-itself/559377

To Reproduce

Expected behavior

Screenshots

Additional context

Thank you!

Same issue happening on my 2020 M1 MBP running the Beta Sanoma 14.1 (23B5056e). Went in and disabled under focus and will see if it keeps opening itself. I found that behavior quite odd as well- of course coming from a MS background not unusual until I thought that since I switched to Apple hardware- behavior is unix-like... as in things do what you expect them to nearly without fail if setup correctly. I certainly never expect a companion app to open itself when I have not told to open itself at login.

edit: Fail. Opened itself again. Checked and still turned off in focus. I'll follow the bug to see if there is anything I can contribute.

robigan commented 12 months ago

Same here, 2020 MacBook Air with Intel i7 running on MacOS Sonoma 14.0, will be trying disabling with Focus mode

plufz commented 11 months ago

Same here in Ventura 13.5.1. I have now disabled HA in Focus. Hoping that will help.

robigan commented 11 months ago

Same here, 2020 MacBook Air with Intel i7 running on MacOS Sonoma 14.0, will be trying disabling with Focus mode

Can confirm it hasn't opened at all since.

PizzaPino commented 11 months ago

Happening to me, too.

jackmcconnell commented 8 months ago

Just started happening for me too.

Nexulo commented 8 months ago

Same problem for me. Very strange...

iMac Retina 5K, 27-inch, Late 2015

sharkwhal commented 8 months ago

Had the same issue, after reading this thread I disabled focus access and haven’t had the app open itself in months now. Strange that this doesn’t work for everyone.

panoptican commented 8 months ago

It’s still doing this constantly. It’s 100% not in my login items or allow in background. I’ve disabled Focus access. I’ve also disabled nearly all sensors leaving only battery state, battery level, and storage on. And still it opens every hour or so.

errormastern commented 7 months ago

Same and still here .. MBP M1 Pro 14" 2021 / Sonoma 14.3.1

DHernan commented 6 months ago

Happening to me as well and when it opens it's blank. M3 Pro 14" 2023 / Sonoma 14.4

homewirelessguy commented 6 months ago

Same for me. MBP M1 Pro 14" 2021 / Ventura 13.6.3

DHernan commented 5 months ago

Had to uninstall. Definitely is the focus launching it. One of the updates now causes it to not crash but instead it has a memory leak which caused my Mac to slow down until I noticed it was "using" 70 GB of memory

Brenzito commented 5 months ago

I can report this is still happening, driving me nuts, especially because it is most noticeable when I'm at work and don't even have access to HA being off my network.

SchroedersKater commented 4 months ago

Same here. Makes the app completely unusable. Very annoying and gives strange impressions, when making a presentation in the public.

guineau commented 4 months ago

This also drives me nuts. The mac app has some usability issues (like try editing text in VScode etc) so I never use it. I use the Arc browser which also supports WebSerial and works properly with Home Assistant.

It's not in Login Items It's not in Allow In Background

EnriqueSubias commented 4 months ago

Same thing happening to me at least once per week...

MBP 16" M1 Max

treblam commented 3 months ago

Does anyone has a clue why didn't this bug get fixed for so long? It's really annoying.

MacPiston commented 3 months ago

Unless this is resolved, I recommend opening Safari, visiting your HA deployment and selecting File -> Add to Dock - that way you'll have "appfied" Web version.

robigan commented 3 months ago

Same here, 2020 MacBook Air with Intel i7 running on MacOS Sonoma 14.0, will be trying disabling with Focus mode

Can confirm it hasn't opened at all since.

I recently (It's been ~3mo) bought an MBP Pro M1 2021 14", Home Assistant App has never spontaneously opened, but I found that HAA is allowed to read my focus mode. I was going through the settings and I wonder if it has got to do with the APNS (Apple Push Notification System) location updates? There are two settings for this, the update sources in location tab and location notifications under the notifications tab in the debug section. Just some food for thought but the APNS is the only way I can think of that an app might want to launch.

dacort commented 2 months ago

Was experiencing this earlier as well and disabled HA in focus mode. Not a problem until I just installed it on another Mac and now it's popping open again. I have noticed in the app's event log, whenever this happens, I see the message "Significant location change detected". So perhaps it is related to location updates. I'll disable it in the Location settings in Privacy & Security as well and see if that helps.

mnott commented 1 month ago

Just used app zapper and completely removed the app. It's just a web frontend anyway, so why not use the browser.