home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.76k stars 30.01k forks source link

Android Mobile App Unable To Login 2021.06.06 #52410

Closed TheFuzz4 closed 2 years ago

TheFuzz4 commented 3 years ago

The problem

On a fresh install of HA Companion App for android with 2021.06.06 in docker the app is unable to fully connect to HA.

I rolled my HA back to 2021.06.0 and I was able to authenticate without issue.

I also tested this with another android phone I have and I cleared out the storage for the HA app on that phone, went to login to HA and got the same error telling it was unable to connect.

I'm thinking that this might be related to #51799 because I can login with 2021.6.4

Thanks for your help with this.

What is version of Home Assistant Core has the issue?

2021.06.06

What was the last working version of Home Assistant Core?

2021.06.4

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Mobile

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Sadly nothing is logged about this.

Additional information

No response

TheFuzz4 commented 3 years ago

I haven't used ADB in a while so I can try and get that setup on my Mac (which is also something I've never attempted before) and try and gather the logs from the app with the 2021.6.6 but I"m sure that there is someone who is more capable than I am at this :)

probot-home-assistant[bot] commented 3 years ago

Hey there @robbiet480, mind taking a look at this issue as its been labeled with an integration (mobile_app) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

Quentame commented 3 years ago

I've actually got the issue on the new girlfriend's iPhone on 2021.6.6.

Tried on the 2021.7.0b2 and working 🤷🏼‍♂️

TheFuzz4 commented 3 years ago

Mine is still having issues on 2021.7.1 outside of my house using the nabucasa URL that is generated automatically. Still trying to figure this out.

besenbruch commented 3 years ago

I have the same issues using connecting on the internal URL using Android devices. Connecting from a Mac Book as well as connection form a Windows PC works OK. I also tried just (some) browsers on Android and it gives me the same error. Running a fresh install of Home Assitant on Docker (Home Assistant 2021.9.6)

cgomesu commented 2 years ago

Same issue. Remote access works fine via web-browser on Linux but mobile devices running Android are unable to connect via the HA Android App. (HASS App for Android versions 2021.9.0-full and 2021.10.0-full under Android 6.0 and 5.1.1, respectively.)

cgomesu commented 2 years ago

Same issue. Remote access works fine via web-browser on Linux but mobile devices running Android are unable to connect via the HA Android App. (HASS App for Android versions 2021.9.0-full and 2021.10.0-full under Android 6.0 and 5.1.1, respectively.)

At least in my case, this was confirmed to be a certificate trust issue. Manually installing the certificate on all affected Android devices fixed the issue.

The specifics about one of my affected setups:

I won't have the time to dig into this until later this week (or possibly the following), so I'm posting this note here for other users who might be facing a similar issue. The issue is likely related to the following reports:


let's encrypt post about the cert expiration:

solution for pfsense users:

besenbruch commented 2 years ago

It is still an enigma for me. While I can assess it with a new phone that never had any homeassistant client installed, the old phone can’t even access the underlying server / IP. I have multiple containers running on the same machine and can’t even access those apps with the browser. I do not use ssl as the access from outside I allow outside access solely over VPN. Also using pfsense as firewall / router.

From: Carlos Gomes @.> Reply to: home-assistant/core @.> Date: Tuesday, 12 October 2021 at 02:30 To: home-assistant/core @.> Cc: Magicard Partners @.>, Comment @.***> Subject: Re: [home-assistant/core] Android Mobile App Unable To Login 2021.06.06 (#52410)

Same issue. Remote access works fine via web-browser on Linux but mobile devices running Android are unable to connect via the HA Android App. (HASS App for Android versions 2021.9.0-full and 2021.10.0-full under Android 6.0 and 5.1.1, respectively.)

At least in my case, this was confirmed to be a certificate trust issue. Manually installing the certificate on all affected Android devices fixed the issue.

The specifics about one of my affected setups: HASS (core-2021.10.2) running behind a pfsense firewall (2.4.5-RELEASE-p1) running the following:

I won't have the time to dig into this until later this week (or possibly the following), so I'm posting this note here for other users who might be facing a similar issue. The issue is likely related to the following reports:

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/52410#issuecomment-940385425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP6QH34NKYJB26BHVMSK233UGM3N5ANCNFSM47VXHPZQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dshokouhi commented 2 years ago

If anyone here is using the android beta can you please update to the latest build and try again? We made some improvements to onboarding to attempt to show better error messaging. If you were able to login and see this error after login then please check App Configuration -> Show and Share Logs to show the errors from the android side of things. If you don't get a good error message then you may need to use a Logcat app to inspect the logs further.

Regarding installing the certificate we do actually mention that in troubleshooting: https://companion.home-assistant.io/docs/troubleshooting/faqs/#using-a-self-signed-certificate-leads-to-a-blank-page-in-android

There is also a more overall networking page too: https://companion.home-assistant.io/docs/troubleshooting/networking

Hope this helps!

besenbruch commented 2 years ago

I got it (partially) working again.

After a lots of attempts with uninstalling and re-installing the app as well as the HA server (in docker), I tried first to connect to some other apps installed on the same IP and it worked. Then - instead of trying to connect with the app straight away - I connected the HA interface via the browser. It worked on the browser and it worked then when I tried to subsequnetly connect via the companion app. Before connecting I set up new users and passwords to assure that there is no false password stored somewhere.

I assume that something lags when the authentication is handled through the app as it forward the interface through the browser.

This only has to be done the first time when connecting the companion app to HA. It is a workaround but maybe helps other user with the same issue.

I did not get it working on second phone as the system browser apparently has still saved the old setting and I cannot delete it. I will try to reset the entire phone and follow the above-mentioned procedure again.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.