Error writing to log when after waking up Phone

Hello. I recently started to get an error from my Companion App running on a Pixel 7 Pro. The error does not occur when I first open the app, but occurs when the phone has been sitting for 5+ mins. When I wake the phone and re-open the Companion App, which was running in the background, I get the following error:

“failed to call service system_log/write. unknown error”

I believe this has something to do with updating sensor, as I use this device to track my location via BLE. I’ve noticed that while the phone “sleeping”, the sensors aren’t updating. Once I get this error, the sensor will update, but only if I’m active on the phone… sensors stop updating it the phone is asleep.

I did check the logs and I didn’t see anything that stood out to me, but obviously I’m missing something.

This error/problem, does not occur on any other devices running, including other phones running the Companion App sending sensor information.

Hoping to get some guidance on how to fix this, as I use location data from this phone to control many things.

Thank you.
David

1 Like

Your companion app might not be allowed to run in the background and established connections might therefore timeout.

I guess I forgot to mention this was working fine for months…

However, I did check and I have it set to allowed to run in the background and data saver turned off.

Android have a “cleanup” running regularly that will remove rights, unless specifically stated otherwise, so months of running fine is no guarantee. :slightly_smiling_face:

Since the settings are correctly, then I am not sure what else it could be

There is nothing in the companion app that will trigger the error you see. Maybe it’s a custom card causing it? Definitely not something that comes from the app so it’s a coincidence that it happens when the app is open.

I’m also noticing this after recently updating HASS 2023.5.4 → 2023.9.2

This is on a Pixel 6 with Android 13.

Perhaps related 2023.9.1 update KO: very very slow, impossible to navigate · Issue #100005 · home-assistant/core · GitHub

Yep this is exactly what I’m getting. I was actually able to reproduce it on another phone (Pixel 3) that I had laying around. For some reason the error seems to start after I leave my home… once I return the device starts throwing this error.

Previously I couldn’t get the error on the Pixel, because I never left home with it.

Have you noticed that when the error only occurs after your phone has been sitting for 5+ mins in standby… when you re-open and the HA app is actively on the screen it throws the error?

I am getting this on chrome (not the companion app). I assumed it was a server side error, but perhaps the browser generated it?

Hi got exactly the same behaviour… super slow UI (no new card installed from .8)… and the Appz need to be restarted if if the Apzz is running background more than 5 min :frowning: … Really annoying behaviour.

Maybe it’s a new power saving setting that have been added to an update lately or just been “fixed”.

So in 2023.9 the frontend was updated to add logs to the system log. Maybe something there is causing this?

https://github.com/home-assistant/frontend/pull/17616

@nickrout thanks for confirming it happens in browser too, the app probably helps trigger it easier is my guess.

My first thought when dealing with frontend issues is to disable all custom cards to rule that out as an immediate issue first. Has that already been done by those impacted by this to rule it out? Cards need to be removed as a resource in order to be completely disabled.

I’ve diagnosed this and should be fixed by the next release. Track at Error message: "Failed to call service system_log/write. unknown error" after update 2023.9.2 · Issue #17954 · home-assistant/frontend · GitHub.

Please note the display notification in this case is harmless and you can safely ignore it.

3 Likes

Thank you for taking a look at this and sharing the information.