Open bjarnekrottje opened 1 month ago
hmm the logs actually dont contain the traceback of the actual crash, we will need that in order to fix the issue as we should not be crashing there. If you have access to android studio that would be the easiest way to get them from logcat
Hi @dshokouhi,
Thank you very much for your quick reply.
Of course I am happy to provide you the information you might need. I have used adb with logcat to get the logs from my personal Android phone.
For anyone looking at how I have done this (or for validation by you), I ran the following command in the same folder as adb:
.\adb.exe logcat | Select-String io.homeassistant.companion.android > logcat.txt
Note: Select-String
has been used instead of grep
since I'm running this on a Windows machine.
While the above command was running, I have done the same steps as in the video above and have triggered the crash of the app. These are the logs that resulted from this: logcat.txt
I hope this file does contain the right logs. If not, I would be happy to look further and see what I can do to help out. Thank you very much in advance!
Thanks for the logs. We may need to get logs again, unfortunately when you grep by teh app name some things go missing. Here i can see the start of a ANR but hard to tell exactly where its happening. After finding the error its best to look at the full time stamp to get the whole error
07-15 20:55:33.970 2142 14790 D ActivityManager: TheiaManager sendEvent:io.homeassistant.companion.android ANR happen
07-15 20:55:35.487 2142 14790 E ActivityManager: ANR in io.homeassistant.companion.android
(io.homeassistant.companion.android/.settings.SettingsActivity)
07-15 20:55:35.487 2142 14790 E ActivityManager: Reason: Input dispatching timed out (5886c87
io.homeassistant.companion.android/io.homeassistant.companion.android.settings.SettingsActivity (server) is not
responding. Waited 5000ms for MotionEvent)
07-15 20:55:35.487 2142 14790 E ActivityManager: Parent: io.homeassistant.companion.android/.settings.SettingsActivity
07-15 20:55:35.487 2142 14790 E ActivityManager: 11% 10957/io.homeassistant.companion.android: 7.4% user + 4.2%
kernel / faults: 43572 minor 141 major
07-15 20:55:35.487 2142 14790 E ActivityManager: 57% 10957/io.homeassistant.companion.android: 23% user + 34%
kernel / faults: 6104 minor 14 major
@dshokouhi, I have changed the way of retrieving the errors to specify the pid. This can be done by using the following adb shell command:
.\adb.exe shell pidof 'io.homeassistant.companion.android'
After which I used that pid to get the correct logs (I hope ;)):
.\adb.exe logcat pid=14801 > logcat_pid.txt
Here are those logs: logcat_pid.txt
I also specified the *:V
flag to make sure to get all of the logs, from the verbose level and up.
Command:
.\adb.exe logcat *:V pid=14801 > logcat_V_pid.txt
This resulted in the following logs: logcat_V_pid.txt
Hopefully these logs do contain the right information you need. It does look like this delivered some more details than the previous logs. Just let me know if I can try it again for you or you can use something else. Thanks in advance!
thanks was able to get the whole error.
As I am unable to reproduce on my end, anything you can tell us about the device?
Alright, good to hear! Hmm, that's unfortunate you were unable to reproduce the issue. I have a OnePlus Nord 3 CE Lite, outside the already mentioned information above in the first message, maybe this information might help:
I can't really think of any other relevant information which could help in this case. Do you maybe have suggestions on what information might be relevant otherwise?
- I do have quite some apps installed (303 according to the Play Store) > Might it have something to do with the time HA takes to load all the app names and having it time out or something?
thats one of hte suspicions we do need to load a list of apps for teh allow list as most users dont know package names.
in the meantime I suggest using the package
attribute of the sensor to filter out responses you dont care for. That is actually how the allow list works for this sensor. The API only returns the next scheduled alarm and there can only be 1 at a time so we skip updates not in the allow list.
Alright, thank you very much for the temporary workaround and the explanation and reasoning behind it. I will do that for now. Is there anything I can do in the meantime to help you looking into why the timeout occurs and how this can be fixed? Thanks you very much in advance!
Home Assistant Android app version(s): 2024.7.1-full
Android version(s): Android 14 (OxygenOS 14.0.0.700 (EX01))
Device model(s): OnePlus Nord CE 3 Lite 5G (CPH2465)
Home Assistant version: Core: 2024.7.2 Supervisor: 2024.06.2 Operating System: 12.4 Frontend: 20240710.0
Last working Home Assistant release (if known): Unknown
Description of problem, include YAML if issue is related to notifications: If I try to open the Allow List selection popup for the 'Next Alarm' sensor to select which apps are allowed to register the alarm notifications, the Home Assistant app appears to crash and not work. This results in me not being able to select the apps, which triggers alarms from apps that shouldn't trigger an alarm in HA.
If I click the Allow List option, I expect a menu to open in which I can select which apps are allowed to set the 'Next Alarm' sensor.
Companion App Logs:
homeassistant_companion_log_6-14-2024_23-9-53.txt
Screenshot or video of problem:
https://github.com/user-attachments/assets/e23294c3-45d2-4831-8bf8-95994e1aef7f
Additional information: If any more information is needed, I would be happy to provide it. Thank you very much in advance!