Open ericswpark opened 9 months ago
I can share logs privately if needed.
we cannot proceed without logs, please get us the logs when the issue is reproduced.
I managed to reproduce the issue and capture the logs. Hoping it doesn't contain anything private:
02-12 10:38:28.723 10287 10287 D ButtonWidget: Broadcast received:
02-12 10:38:28.723 10287 10287 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_OFF
02-12 10:38:28.723 10287 10287 D ButtonWidget: AppWidgetId: -1
02-12 10:38:28.726 10287 10287 D MediaPlayCtrlsWidget: Broadcast received:
02-12 10:38:28.726 10287 10287 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_OFF
02-12 10:38:28.726 10287 10287 D MediaPlayCtrlsWidget: AppWidgetId: -1
02-12 10:38:28.755 10287 14030 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:28.758 10287 10336 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=9c0b1934-17b1-4817-a2b9-c33e18cce43f, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
02-12 10:38:29.928 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=3
02-12 10:38:29.942 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=3
02-12 10:38:29.972 10287 10287 D SurfaceView@d913ebb: 227622587 updateSurface: has no frame
02-12 10:38:30.201 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=3
02-12 10:38:30.201 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=3
02-12 10:38:31.247 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=4
02-12 10:38:31.247 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=4
02-12 10:38:31.276 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=4 newDisplayState=4
02-12 10:38:31.277 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=4 newDisplayState=4
02-12 10:38:35.022 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=4 newDisplayState=3
02-12 10:38:35.023 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=4 newDisplayState=3
02-12 10:38:35.052 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=3
02-12 10:38:35.052 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=3
02-12 10:38:35.085 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=1
02-12 10:38:35.086 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=3 newDisplayState=1
02-12 10:38:35.336 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=1
02-12 10:38:35.337 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=1
02-12 10:38:55.060 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=2
02-12 10:38:55.061 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=1 newDisplayState=2
02-12 10:38:55.078 10287 10287 D SurfaceView@d913ebb: 227622587 updateSurface: has no frame
02-12 10:38:55.204 10287 10287 D SensorReceiver: Received intent: android.intent.action.SCREEN_ON
02-12 10:38:55.204 10287 10287 D SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
02-12 10:38:55.207 10287 10287 D ButtonWidget: Broadcast received:
02-12 10:38:55.207 10287 10287 D ButtonWidget: Broadcast action: android.intent.action.SCREEN_ON
02-12 10:38:55.207 10287 10287 D ButtonWidget: AppWidgetId: -1
02-12 10:38:55.208 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.220 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.220 10287 10287 D ServerConnectionInfo: Using external URL
02-12 10:38:55.235 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.235 10287 10287 D ServerConnectionInfo: Using external URL
02-12 10:38:55.239 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.239 10287 10287 D ServerConnectionInfo: Using external URL
02-12 10:38:55.244 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.244 10287 10287 D ServerConnectionInfo: Using external URL
02-12 10:38:55.245 10287 10287 D MediaPlayCtrlsWidget: Broadcast received:
02-12 10:38:55.245 10287 10287 D MediaPlayCtrlsWidget: Broadcast action: android.intent.action.SCREEN_ON
02-12 10:38:55.245 10287 10287 D MediaPlayCtrlsWidget: AppWidgetId: -1
02-12 10:38:55.250 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.253 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:38:55.254 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:38:55.288 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.288 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:38:55.288 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:38:55.295 10287 10287 D TrafficStats: tagSocket(222) with statsTag=0xffffffff, statsUid=-1
02-12 10:38:55.303 10287 10287 E StaticWidget: Unable to fetch entity
02-12 10:38:55.303 10287 10287 E StaticWidget: retrofit2.HttpException: HTTP 404 Not Found
02-12 10:38:55.303 10287 10287 E StaticWidget: at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
02-12 10:38:55.303 10287 10287 E StaticWidget: at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
02-12 10:38:55.303 10287 10287 E StaticWidget: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
02-12 10:38:55.303 10287 10287 E StaticWidget: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
02-12 10:38:55.303 10287 10287 E StaticWidget: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
02-12 10:38:55.303 10287 10287 E StaticWidget: at java.lang.Thread.run(Thread.java:1012)
02-12 10:38:55.313 10287 10287 I AppWidgetManager: updateAppWidget() appWidgetIds = [7]
02-12 10:38:55.314 10287 14030 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:38:55.315 10287 10330 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=20ec44f5-39d6-4842-97d8-e37a2d90f620, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
02-12 10:38:55.316 10287 10287 I AppWidgetManager: updateAppWidget() appWidgetIds = [8]
02-12 10:38:57.945 10287 10287 D AppWidgetManager: partiallyUpdateAppWidget() appWidgetIds = [8]
02-12 10:38:57.947 10287 10287 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:39:01.228 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:39:01.228 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:39:10.349 10287 10287 D TrafficStats: tagSocket(222) with statsTag=0xffffffff, statsUid=-1
02-12 10:39:16.408 10287 10287 D TrafficStats: tagSocket(222) with statsTag=0xffffffff, statsUid=-1
02-12 10:39:18.530 10287 10287 I ViewRootImpl@66f2580[WebViewActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:39:18.530 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: onDisplayChanged oldDisplayState=2 newDisplayState=2
02-12 10:39:18.569 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: handleAppVisibility mAppVisible = false visible = true
02-12 10:39:18.593 10287 10287 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.app.Activity$$ExternalSyntheticLambda0@97c92b8
02-12 10:39:18.627 10287 10287 I ViewRootImpl@240e5cc[SettingsActivity]: dispatchDetachedFromWindow
02-12 10:39:18.629 10287 10287 D InputTransport: Input channel destroyed: '4c60e70', fd=374
02-12 10:39:18.695 10287 10287 I DecorView: setWindowBackground: isPopOver=false color=ffffffff d=android.graphics.drawable.ColorDrawable@882003
02-12 10:39:18.722 10287 10287 D ScrollView: initGoToTop
02-12 10:39:18.735 10287 10287 E TextView: Saved cursor position 645/645 out of range for text
02-12 10:39:18.738 10287 10287 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1707744320937, currentMillis: 1707752358737)
02-12 10:39:18.739 10287 15456 D NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
02-12 10:39:18.750 10287 10287 I InsetsController: onStateChanged: host=io.homeassistant.companion.android/io.homeassistant.companion.android.settings.SettingsActivity, from=android.view.ViewRootImpl.setView:1744, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 904, 2316), mDisplayCutout=DisplayCutout{insets=Rect(0, 85 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(423, 0 - 482, 85), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=904 displayHeight=2316 physicalDisplayWidth=904 physicalDisplayHeight=2316 density={2.625} cutoutSpec={M 0,0 H -11.23809523809524 V 32.38095238095238 H 11.23809523809524 V 0 H 0 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=0, center=Point(0, 0)}, RoundedCorner{position=TopRight, radius=0, center=Point(0, 0)}, RoundedCorner{position=BottomRight, radius=0, center=Point(0, 0)}, RoundedCorner{position=BottomLeft, radius=0, center=Point(0, 0)}]} mRoundedCornerFrame=Rect(0, 0 - 904, 2316), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(788, 0 - 904, 85) rotation=0}, mDisplayShape=DisplayShape{ spec=-1016533545 displayWidth=904 displayHeight=2316 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {27 mType=displayCutout mFrame=[0,0][904,85] mVisible=true mFlags=[]}, InsetsSource: {e3a0000 mType=statusBars mFrame=[0,0][904,85] mVisible=true mFlags=[]}, InsetsSource: {e3a0005 mType=mandatorySystemGestures mFrame=[0,0][904,117] mVisible=true mFlags=[]}, InsetsSource: {e3a0006 mType=tappableElement mFrame=[0,0][904,85] mVisible=true mFlags=[]}, InsetsSource: {26b70001 mType=navigationBars mFrame=[0,0][0,0] mVisible=true mFlags=[SUPPRESS_SCRIM]}, InsetsSource: {26b70004 mType=systemGestures mFrame=[0,0][83,2316] mVisible=true mFlags=[]}, InsetsSource: {26b70005 mType=mandatorySystemGestures mFrame=[0,2251][904,2316] mVisible=true mFlags=[]}, InsetsSource: {26b70006 mType=tappableElement mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {26b70024 mType=systemGestures mFrame=[821,0][904,2316] mVisible=true mFlags=[]}, InsetsSource: {48a10004 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {48a10005 mType=mandatorySystemGestures mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {48a10006 mType=tappableElement mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {48a10024 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags=[]} }
02-12 10:39:18.750 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: synced displayState. AttachInfo displayState=2
02-12 10:39:18.753 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: setView = com.android.internal.policy.DecorView@c87f7ab TM=true
02-12 10:39:18.796 10287 10287 I BLASTBufferQueue_Java: new BLASTBufferQueue, mName= ViewRootImpl@4a898ee[SettingsActivity] mNativeObject= 0xb40000784af22400 sc.mNativeObject= 0xb40000784ae7de00 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3015 android.view.ViewRootImpl.relayoutWindow:10048 android.view.ViewRootImpl.performTraversals:4092 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257 android.view.Choreographer$CallbackRecord.run:1650 android.view.Choreographer$CallbackRecord.run:1659 android.view.Choreographer.doCallbacks:1129 android.view.Choreographer.doFrame:1055 android.view.Choreographer$FrameDisplayEventReceiver.run:1622
02-12 10:39:18.796 10287 10287 I BLASTBufferQueue_Java: update, w= 904 h= 2316 mName = ViewRootImpl@4a898ee[SettingsActivity] mNativeObject= 0xb40000784af22400 sc.mNativeObject= 0xb40000784ae7de00 format= -1 caller= android.graphics.BLASTBufferQueue.<init>:89 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3015 android.view.ViewRootImpl.relayoutWindow:10048 android.view.ViewRootImpl.performTraversals:4092 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257
02-12 10:39:18.797 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: Relayout returned: old=(0,0,904,2316) new=(0,0,904,2316) relayoutAsync=false req=(904,2316)0 dur=33 res=0x403 s={true 0xb400007869d86800} ch=true seqId=0
02-12 10:39:18.797 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: performConfigurationChange setNightDimText nightDimLevel=0
02-12 10:39:18.797 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: mThreadedRenderer.initialize() mSurface={isValid=true 0xb400007869d86800} hwInitialized=true
02-12 10:39:18.798 10287 10287 D ScrollView: onsize change changed
02-12 10:39:18.799 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: reportNextDraw android.view.ViewRootImpl.performTraversals:4694 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257 android.view.Choreographer$CallbackRecord.run:1650 android.view.Choreographer$CallbackRecord.run:1659
02-12 10:39:18.799 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: Setup new sync=wmsSync-ViewRootImpl@4a898ee[SettingsActivity]#98
02-12 10:39:18.799 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: Creating new active sync group ViewRootImpl@4a898ee[SettingsActivity]#99
02-12 10:39:18.799 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: registerCallbacksForSync syncBuffer=false
02-12 10:39:18.803 10287 15556 D ViewRootImpl@4a898ee[SettingsActivity]: Received frameDrawingCallback syncResult=0 frameNum=1.
02-12 10:39:18.803 10287 15556 I ViewRootImpl@4a898ee[SettingsActivity]: mWNT: t=0xb40000784ae94f00 mBlastBufferQueue=0xb40000784af22400 fn= 1 caller= android.view.ViewRootImpl$8.onFrameDraw:13674 android.view.ThreadedRenderer$1.onFrameDraw:788 <bottom of call stack>
02-12 10:39:18.803 10287 15556 D ViewRootImpl@4a898ee[SettingsActivity]: Setting up sync and frameCommitCallback
02-12 10:39:18.816 10287 15456 I BLASTBufferQueue: [ViewRootImpl@4a898ee[SettingsActivity]#35](f:0,a:0,s:0) onFrameAvailable the first frame is available
02-12 10:39:18.817 10287 15456 D ViewRootImpl@4a898ee[SettingsActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
02-12 10:39:18.817 10287 15456 D OpenGLRenderer: CFMS:: SetUp Pid : 10287 Tid : 15456
02-12 10:39:18.817 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: reportDrawFinished
02-12 10:39:18.819 10287 13774 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
02-12 10:39:18.821 10287 13774 D LogcatReader: Read logcat for pid 10287
02-12 10:39:18.828 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: registerCallbackForPendingTransactions
02-12 10:39:18.828 10287 10287 I InsetsSourceConsumer: applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=io.homeassistant.companion.android/io.homeassistant.companion.android.settings.SettingsActivity
02-12 10:39:18.829 10287 10287 I InsetsSourceConsumer: applyRequestedVisibilityToControl: visible=true, type=statusBars, host=io.homeassistant.companion.android/io.homeassistant.companion.android.settings.SettingsActivity
02-12 10:39:18.829 10287 15555 I ViewRootImpl@4a898ee[SettingsActivity]: mWNT: t=0xb40000784ae38380 mBlastBufferQueue=0xb40000784af22400 fn= 3 caller= android.view.ViewRootImpl$6.onFrameDraw:5582 android.view.ViewRootImpl$2.onFrameDraw:2131 android.view.ThreadedRenderer$1.onFrameDraw:788
02-12 10:39:18.829 10287 10287 D SettingsWearDetection: API unavailable for discovering nodes (no Wear)
02-12 10:39:18.837 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: handleWindowFocusChanged: 1 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0
02-12 10:39:18.838 10287 10287 D ViewRootImpl@4a898ee[SettingsActivity]: mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb400007869d86800}
02-12 10:39:18.838 10287 10287 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1707744320937, currentMillis: 1707752358838)
02-12 10:39:18.838 10287 10287 D IntegrationRepository: setAppActive(): true
02-12 10:39:18.838 10287 10287 D InputMethodManagerUtils: startInputInner - Id : 0
02-12 10:39:18.838 10287 10287 I InputMethodManager: startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
02-12 10:39:18.862 10287 10287 I InsetsSourceConsumer: applyRequestedVisibilityToControl: visible=false, type=ime, host=io.homeassistant.companion.android/io.homeassistant.companion.android.settings.SettingsActivity
02-12 10:39:18.863 10287 12075 I ViewRootImpl@4a898ee[SettingsActivity]: Resizing android.view.ViewRootImpl@69eb975: frame = [0,0][904,2316] reportDraw = false forceLayout = false syncSeqId = -1
02-12 10:39:18.863 10287 10287 I ViewRootImpl@4a898ee[SettingsActivity]: handleResized, msg = 4 frames=ClientWindowFrames{frame=[0,0][904,2316] display=[0,0][904,2316] parentFrame=[0,0][0,0]} forceNextWindowRelayout=false displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false
02-12 10:39:18.872 10287 18907 D TrafficStats: tagSocket(249) with statsTag=0xffffffff, statsUid = -1
The button widget was pressed sometime around 10:39.
02-12 10:38:55.303 10287 10287 E StaticWidget: Unable to fetch entity
02-12 10:38:55.303 10287 10287 E StaticWidget: retrofit2.HttpException: HTTP 404 Not Found
your server is returning a 404 error , this needs to be solved anything unique about your setup? can you try logging out and logging back in to the app?
@dshokouhi only thing I can think of is the Home Assistant instance works over Tailscale.
But, this happens even on home Wi-Fi, where Tailscale is not required for mDNS discovery.
I don't believe it's an authentication issue as when I launch the app it loads the dashboard after a second or two.
the issue is that the server is returning a 404 error and that is not an error the app can solve, this must be solved on teh server end.
@dshokouhi Well is there a way to see where it got that error from? If it's from the server, is there a way to see why the server returned a 404 in the HA logs?
@dshokouhi Well is there a way to see where it got that error from? If it's from the server, is there a way to see why the server returned a 404 in the HA logs?
you can try checking HA core logs to see if any error correlates there but as you mentioned you use tailscale the error may originate from elsewhere. Its not as easy to tell but the API the app is using looks to be failing due to a 404 error so I would start checking things on the network. Make sure all APIs are open in case you are restricting something. A 404 error is a bit unexpected here as I would imagine we would see a failed to connect error or something similar.
So just to confirm the issue you are seeing is that the widget gets stuck in this state presumably with the same error and never it recovers? or it eventually recovers? Do you ever see the widget with an error message? You only have this one Entity State widget correct?
@dshokouhi
Make sure all APIs are open in case you are restricting something.
No restrictions, as far as I'm aware.
with the same error and never it recovers? or it eventually recovers? Do you ever see the widget with an error message?
The widget:
No error messages are shown, through toasts or notifications, as far as I'm aware, other than the third aforementioned state where the error symbol is shown.
It eventually recovers when I do other stuff on the phone and then come back to the widget. I find that it has recovered in the background, but am unsure how long this recovery process takes. Sometimes launching the HA companion app, quitting it, and then repeating a couple of times makes the widget recover, but not always.
You only have this one Entity State widget correct?
Yup, just this entity widget.
EDIT: updated when the widget "recovers" from this bugged state
EDIT2:
you can try checking HA core logs to see if any error correlates there
Forgot to mention, I did check, but there's nothing of note.
- sometimes gets stuck in this infinite loading loop
- sometimes shows the error symbol (the one with the red exclamation mark and refresh icon). Pressing it usually leads to the infinite loading circle (I don't think I've seen it recover to the "function correctly" state when the error symbol is shown)
Can you check if its always the same error here and the same amount of time things take? Our error handling here is always the same so it sorta suggests some calls just take forever to get a response back which is why the loader looks to be stuck. Although that is also odd because we set a timeout to 30 seconds. However teh 404 error the server is returning is also unexpected and not common.
I would also suggest bypassing the entire tailscale setup and connect directly to the server to rule out a configuration issue.
I can test with Tailscale disabled when I get back home today, but in the meantime I think that timeout might be too high. Is there a way for the user to tweak that setting? I think ideally it should be around 10 seconds or so, and it should retry once before showing an error screen. So it'll allow for transient network failures (or switching from Wi-Fi to mobile data), and it'll be shorter than 30 seconds.
Is there a way for the user to tweak that setting? I think ideally it should be around 10 seconds or so, and it should retry once before showing an error screen. So it'll allow for transient network failures (or switching from Wi-Fi to mobile data), and it'll be shorter than 30 seconds.
no these are sane defaults to work with majority of setups and use cases. Retries are already configured in places appropriate. This current code works fine for most users. As mentioned before the 404 error you are facing is unique and not common which may also relate to why the widget looks stuck. In your logs the error returned immediately but we are not sure this is always the case, even in the event a timeout has reached we should still show the error.
1 more request, can you please share teh configuration of the widget having the issue please?
@dshokouhi sure:
@dshokouhi just got back home, enabled and connected to Wi-Fi, disabled Tailscale, and re-tested. Widget got stuck on the first try, which is good for repro :) So we can definitely rule out Tailscale from the equation.
I let the widget load, and it continuously ran for way longer than 30 seconds. After 90 seconds, I decided to collect logs (attached below). When I exited out of the Home Assistant app it was still loading. I checked it a couple of minutes later and it correctly showed the entity state, although I am not sure when it got unstuck.
So when the widget gets into this state it doesn't time out, nor does it retry the operation. Or at least it appears to behave that way. Tapping on the widget during this infinite load state does nothing.
The widget was pressed at around 15:48 or 49. (It got unstuck between then and 56.)
Any progress on this?
I'm having this issue as well on my android devices. Sometimes the entity state widget spins for a long time or forever. The only workaround I have found so far is to turn the screen off and on. I have this issue on android 11 and android 14 with home assistant 2024.6.4. My device are an old Pixel C tablet and an Samsung Galaxy Tab S10.
Same issue on 2024.7
Widgets have never been reliable for me on several home assistant installations and several phones with different versions of android. Currently on pixel 7
Thanks for the logs @ericswpark I do see it still encountered a failure and then later on the connection re-established. The app does not continuously try to reconnect but connection attempts do occur when the screen turns on for widgets as that is how we keep the state up to date.
02-12 15:48:30.347 10287 30628 E WebSocketRepository: Websocket: onFailure
02-12 15:48:30.347 10287 30628 E WebSocketRepository: java.net.SocketException: Software caused connection abort
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.socketRead0(Native Method)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.read(SocketInputStream.java:173)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.read(SocketInputStream.java:143)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.InputStreamSource.read(JvmOkio.kt:93)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.request(RealBufferedSource.kt:209)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.require(RealBufferedSource.kt:202)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.readByte(RealBufferedSource.kt:212)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.lang.Thread.run(Thread.java:1012)
@radinsky @Hyrules and @jacauc can you guys please confirm you are talking about the entity state widget and also get the companion app logs when the issue occurs. Its important to make sure you guys are indeed experiencing the same issue or not.
@dshokouhi yes for me it's the entity state widget. I'll try to get you a log asap. thanks for the follow up.
Edit : I see a lot of socket connection refused for some reason. After turning off the screen everything works fine.
Thanks those socket errors are not coming from our code directly so not sure what they are but i do see communication working there as the server is sending the app messages. In these logs you were able to reproduce the issue?
technically yes. I pressed the entity widget and after a few seconds I went to get the logs. I'll try to get another for you when it happens again. Right now I cannot reproduce the issue.
Thanks for the logs @ericswpark I do see it still encountered a failure and then later on the connection re-established. The app does not continuously try to reconnect but connection attempts do occur when the screen turns on for widgets as that is how we keep the state up to date.
02-12 15:48:30.347 10287 30628 E WebSocketRepository: Websocket: onFailure 02-12 15:48:30.347 10287 30628 E WebSocketRepository: java.net.SocketException: Software caused connection abort 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.socketRead0(Native Method) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.socketRead(SocketInputStream.java:118) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.read(SocketInputStream.java:173) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.net.SocketInputStream.read(SocketInputStream.java:143) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.InputStreamSource.read(JvmOkio.kt:93) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.request(RealBufferedSource.kt:209) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.require(RealBufferedSource.kt:202) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okio.RealBufferedSource.readByte(RealBufferedSource.kt:212) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 02-12 15:48:30.347 10287 30628 E WebSocketRepository: at java.lang.Thread.run(Thread.java:1012)
@radinsky @Hyrules and @jacauc can you guys please confirm you are talking about the entity state widget and also get the companion app logs when the issue occurs. Its important to make sure you guys are indeed experiencing the same issue or not.
Confirmed, it's Entity State Widget
@dshokouhi Here is another log file. I hope it shows the issue. I have pressed 3 entities state widget and they are still spinning at the moment of writing this message.
Facing the same issue here. When at home through WIFI, all works fine. When outside, widgets work just randomly as explained by other folks in this issue.
For example, if I push a widget that is a button and gets stuck loading, I just need to open the HA app and the widget automatically ends up working.
BTW, I use HA Cloud through Nabu Casa.
In my case it's happens on wifi in my home network. I'm not accessing HA from outside my network. I have this issue on android on 2 different tablets one which is an old pixel C tablet and a new Samsung Galaxy Tab.
Happens to me also. Although intermittently
Home Assistant Android app version(s): 2024.1.5-full
Android version(s): Android 14
Device model(s): Z Fold 5
Home Assistant version: 2024.2.1
Last working Home Assistant release (if known): N/A
Description of problem, include YAML if issue is related to notifications:
Sometimes the Home Assistant app get stuck trying to refresh the widget. See attached screenshot. The loading circle continues to spin, sometimes even after entering the app, flipping the entity connected to the toggle widget, and exiting.
Companion App Logs:
I can share logs privately if needed.
Screenshot or video of problem:
Additional information: