android icon indicating copy to clipboard operation
android copied to clipboard

App stops reporting back to Home Assistant - Fatal Exception

Open soloam opened this issue 2 years ago • 8 comments

Home Assistant Android version: 2022.6.0-full

Android version: 12

Phone model: Pixel 3 XL

Home Assistant version: 2022.7.3

Last working Home Assistant release (if known): ?

Description of problem: App stops reporting back to Home Assistant, after debugging with logcat, I found some Fatal Exceptions that could be the problem.

Also I found a error around the time that the app stopped reporting, that seams that it's removing all the listeners

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):

Fatal Exception:

[08-08 13:26:42.607 4077:5499 E/AndroidRuntime]
FATAL EXCEPTION: DefaultDispatcher-worker-4
Process: io.homeassistant.companion.android, PID: 4077
java.net.SocketTimeoutException: failed to connect to xxxx.xxxx.xx/xxx.xxx.xxx.xxx (port 8123) from /xxx.xxx.xxx.xxx (port 39996) after 10000ms
	at libcore.io.IoBridge.connectErrno(IoBridge.java:236)
	at libcore.io.IoBridge.connect(IoBridge.java:180)
	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
	at java.net.Socket.connect(Socket.java:621)
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@f47db2f, Dispatchers.IO]

[08-08 22:25:20.844 15213:25838 E/AndroidRuntime]
FATAL EXCEPTION: DefaultDispatcher-worker-3
Process: io.homeassistant.companion.android, PID: 15213
java.net.SocketTimeoutException: failed to connect to xxxx.xxxx.xx/xxx.xxx.xxx.xxx (port 8123) from /xxx.xxx.xxx.xxx (port 38924) after 10000ms
	at libcore.io.IoBridge.connectErrno(IoBridge.java:236)
	at libcore.io.IoBridge.connect(IoBridge.java:180)
	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
	at java.net.Socket.connect(Socket.java:621)
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@b0560d, Dispatchers.IO]

App stopped responding:

[08-09 19:12:27.471 1873:1873 I/BackupManagerService]
[UserID:0] Full backup time but io.homeassistant.companion.android is busy; deferring to 2022-08-09 21:51:27

[08-09 19:12:27.488 1873:3920 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068720055

[08-09 19:12:31.280 1873:2002 I/ActivityManager]
Killing 31206:io.homeassistant.companion.android/u0a226 (adj 100): stop com.google.android.webview due to update lib

[08-09 19:12:31.286 1873:1873 V/NotificationListeners]
0 notification listener connection lost: ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager}

[08-09 19:12:31.286 1873:1873 W/NotificationListeners]
0 notification listener binding died: ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager}

[08-09 19:12:31.287 1873:2002 W/ActivityTaskManager]
Force removing ActivityRecord{fb25beb u0 io.homeassistant.companion.android/.webview.WebViewActivity t617 f}}: app died, no saved state

[08-09 19:12:31.316 1873:2001 W/UsageStatsService]
Unexpected activity event reported! (io.homeassistant.companion.android/io.homeassistant.companion.android.webview.WebViewActivity event : 23 instanceId : 252289850)

[08-09 19:12:31.325 1873:2002 W/ActivityManager]
ProcessRecord{25d2746 0:io.homeassistant.companion.android/u0a226} is attached to a previous process 31206

[08-09 19:12:31.334 1873:1873 E/NotificationListeners]
unable to notify listener (removed): ManagedServiceInfo[component=ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager},userid=0,isSystem=false,targetSdkVersion=31,connection=<connection>,service=android.service.notification.INotificationListener$Stub$Proxy@6c00c71]
android.os.DeadObjectException
	at android.os.BinderProxy.transactNative(Native Method)
	at android.os.BinderProxy.transact(BinderProxy.java:571)
	at android.service.notification.INotificationListener$Stub$Proxy.onNotificationRemoved(INotificationListener.java:632)
	at com.android.server.notification.NotificationManagerService$NotificationListeners.notifyRemoved(NotificationManagerService.java:10680)
	at com.android.server.notification.NotificationManagerService$NotificationListeners.lambda$notifyRemovedLocked$3$NotificationManagerService$NotificationListeners(NotificationManagerService.java:10502)
	at com.android.server.notification.NotificationManagerService$NotificationListeners$$ExternalSyntheticLambda5.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at com.android.server.SystemServer.run(SystemServer.java:903)
	at com.android.server.SystemServer.main(SystemServer.java:610)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)

[08-09 19:12:31.335 1873:1873 E/NotificationListeners]
unable to notify listener (removed): ManagedServiceInfo[component=ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager},userid=0,isSystem=false,targetSdkVersion=31,connection=<connection>,service=android.service.notification.INotificationListener$Stub$Proxy@6c00c71]
android.os.DeadObjectException
	at android.os.BinderProxy.transactNative(Native Method)
	at android.os.BinderProxy.transact(BinderProxy.java:571)
	at android.service.notification.INotificationListener$Stub$Proxy.onNotificationRemoved(INotificationListener.java:632)
	at com.android.server.notification.NotificationManagerService$NotificationListeners.notifyRemoved(NotificationManagerService.java:10680)
	at com.android.server.notification.NotificationManagerService$NotificationListeners.lambda$notifyRemovedLocked$3$NotificationManagerService$NotificationListeners(NotificationManagerService.java:10502)
	at com.android.server.notification.NotificationManagerService$NotificationListeners$$ExternalSyntheticLambda5.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at com.android.server.SystemServer.run(SystemServer.java:903)
	at com.android.server.SystemServer.main(SystemServer.java:610)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)

[08-09 19:12:31.499 1873:4475 D/NotificationListeners]
Removing active service ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager}

[08-09 19:12:31.501 1873:5783 V/ActivityManager]
Got obituary of 31206:io.homeassistant.companion.android

[08-09 19:12:31.631 1873:2003 I/ActivityManager]
Start proc 8805:io.homeassistant.companion.android/u0a226 for broadcast {io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.LocationSensorManager}

[08-09 19:12:33.743 1873:4475 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: CEM ; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:SYSTEM_ALERT_WINDOW_PERMISSION; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:12:33.756 1873:5783 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:12:34.428 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:12:34.428 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068753918

[08-09 19:12:34.831 1873:2002 I/ActivityManager]
Killing 8805:io.homeassistant.companion.android/u0a226 (adj 200): stop com.google.android.webview due to update lib

[08-09 19:12:34.864 1873:2002 W/ActivityManager]
ProcessRecord{2362175 0:io.homeassistant.companion.android/u0a226} is attached to a previous process 8805

[08-09 19:12:34.909 1873:3958 V/ActivityManager]
Got obituary of 8805:io.homeassistant.companion.android

[08-09 19:12:34.924 1873:2003 I/ActivityManager]
Start proc 9134:io.homeassistant.companion.android/u0a226 for broadcast {io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.LocationSensorManager}

[08-09 19:12:40.678 1873:3959 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: TRNB; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:SYSTEM_ALERT_WINDOW_PERMISSION; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:12:40.695 1873:3920 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:12:41.296 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:12:41.297 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068761228

[08-09 19:12:41.308 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:12:41.308 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068761228

[08-09 19:12:41.316 1873:1873 V/NotificationListeners]
binding: Intent { act=android.service.notification.NotificationListenerService cmp=io.homeassistant.companion.android/.sensors.NotificationSensorManager (has extras) }

[08-09 19:12:41.321 1873:1873 V/NotificationListeners]
0 notification listener service connected: ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.sensors.NotificationSensorManager}

[08-09 19:12:41.451 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:12:41.451 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068761228

[08-09 19:13:00.322 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:13:00.322 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068780111

[08-09 19:13:02.075 1873:4475 W/ProcessStats]
Tracking association SourceState{26a7c9e system/1000 BTopFgs #388946} whose proc state 2 is better than process ProcessState{983637f io.homeassistant.companion.android/10226 pkg=io.homeassistant.companion.android} proc state 3 (416 skipped)

[08-09 19:13:07.480 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:13:07.480 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068787228

[08-09 19:14:00.477 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:14:00.477 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068840104

[08-09 19:14:25.379 1873:2606 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:14:25.384 1873:2291 W/ProcessStats]
Tracking association SourceState{26a7c9e system/1000 BTopFgs #389183} whose proc state 2 is better than process ProcessState{983637f io.homeassistant.companion.android/10226 pkg=io.homeassistant.companion.android} proc state 3 (7 skipped)

[08-09 19:14:25.384 1873:4475 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:14:25.745 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:14:25.745 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068865448

[08-09 19:14:28.144 1873:2606 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:14:28.149 1873:3960 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:14:28.438 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:14:28.438 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068868190

[08-09 19:15:00.528 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:15:00.528 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068900102

[08-09 19:15:42.034 1873:1906 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:15:42.039 1873:5783 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:15:42.409 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:15:42.409 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068942083

[08-09 19:16:00.477 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:16:00.477 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660068960111

[08-09 19:17:00.444 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:17:00.444 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069020076

[08-09 19:18:00.478 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:18:00.478 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069080095

[08-09 19:18:54.536 1873:4475 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:18:54.540 1873:1907 W/ProcessStats]
Tracking association SourceState{26a7c9e system/1000 BTopFgs #389703} whose proc state 2 is better than process ProcessState{983637f io.homeassistant.companion.android/10226 pkg=io.homeassistant.companion.android} proc state 3 (8 skipped)

[08-09 19:18:54.541 1873:3008 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:18:54.946 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:18:54.946 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069134589

[08-09 19:18:59.854 1873:4475 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

[08-09 19:18:59.862 1873:3960 W/ActivityManager]
Foreground service started from background can not have location/camera/microphone access: service io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService

[08-09 19:19:00.229 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:19:00.229 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069139925

[08-09 19:20:00.480 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:20:00.480 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069200092

[08-09 19:21:00.467 1873:2301 E/AppOps]
attributionTag  not declared in manifest of io.homeassistant.companion.android

[08-09 19:21:00.467 1873:2301 W/AppOps]
Noting op not finished: uid 10226 pkg io.homeassistant.companion.android code 79 startTime of in progress event=1660069260101

[08-09 19:21:43.083 1873:5783 I/ActivityManager]
Background started FGS: Allowed [callingPackage: io.homeassistant.companion.android; callingUid: 10226; uidState: BFGS; intent: Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }; code:PROC_STATE_BFGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null]

Screenshot of problem:

Additional information:

soloam avatar Aug 10 '22 10:08 soloam

Also I found a error around the time that the app stopped reporting, that seams that it's removing all the listeners

that is correct, if the application crashed then our worker schedules are also removed

Can you check to see if there are any log errors above the Fatal Exception?

dshokouhi avatar Aug 10 '22 17:08 dshokouhi

I don't have nothing prior to that fatal those are the first on my log! 🙄

Regarding my statement, if you look at the fatal exceptions date and hour, they are not the same from my second log, when the listeners are cleared! I don't understand the reason to the listeners being cleared in the second log

soloam avatar Aug 10 '22 21:08 soloam

I don't have nothing prior to that fatal those are the first on my log! 🙄

As you had used logcat reader here you should be able to change your filter to look above the log line. Might be easier to find the crash and then change the search to the time of the crash to look at what happened just before.

Regarding my statement, if you look at the fatal exceptions date and hour, they are not the same from my second log, when the listeners are cleared! I don't understand the reason to the listeners being cleared in the second log

The listener error is actually a cause of the app crashing beforehand. The app gets a listener since the notification permission was granted which is required to be used for the notification sensors. In this case the app dies and the listener is no longer associated to anything until the next time the app starts up.

dshokouhi avatar Aug 11 '22 00:08 dshokouhi

I can no longer see that fatal error, I think that my log have rotated! Do you need that info to see the crash information? If yes I have to wait until it repeats again 😶

soloam avatar Aug 11 '22 00:08 soloam

thats fine, not really necessary but there may be something else above it that can help pinpoint when it happens :) next time you notice it if you could do a check that would be great

dshokouhi avatar Aug 11 '22 00:08 dshokouhi

The listener error is actually a cause of the app crashing beforehand. The app gets a listener since the notification permission was granted which is required to be used for the notification sensors. In this case the app dies and the listener is no longer associated to anything until the next time the app starts up.

Yes, but if you look at the time, the fatal exceptions are from the day 8, and the logs from the app stop reporting are from the day 9. Not the same day and I don't even have a fatal crash on that day! Something made the app stop... From this day I have all the logs and saved them

soloam avatar Aug 11 '22 00:08 soloam

then the second error is separate from the fatal exception and may require a separate issue, there should be more logs above as I can see the app being killed before the listener error so something must've happened earlier there.

[08-09 19:12:31.280 1873:2002 I/ActivityManager]
Killing 31206:io.homeassistant.companion.android/u0a226 (adj 100): stop com.google.android.webview due to update lib

there should be something else above this

dshokouhi avatar Aug 11 '22 00:08 dshokouhi

Ok, I'll open a new issue with more information regarding this error! We can keep this issue only for the Fatal Exception!

Tks for the time invested on this

soloam avatar Aug 11 '22 00:08 soloam