home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.24k stars 626 forks source link

Last Notification suddenly empty (Android) #4385

Closed DarthSonic closed 3 months ago

DarthSonic commented 4 months ago

Home Assistant Android app version(s): 2024.4.1-full

Android version(s): 14

Device model(s): Samsung Galaxy S23

Home Assistant version: 2024.5.1

Last working Home Assistant release (if known):

Description of problem, include YAML if issue is related to notifications: Last Notification attributes for title and text are null on every notification.

Companion App Logs:

? 

Screenshot or video of problem: image

Additional information:

dshokouhi commented 4 months ago

What other data is there? Those attributes are not always guaranteed to be there with values.

DarthSonic commented 4 months ago

image

it worked last weekend for my football scores, today suddenly stopped working

dshokouhi commented 4 months ago

That's an issue with the app posting the notification. Looks like it might be a group? Can you share a screenshot of the notification in question?

DarthSonic commented 4 months ago

image

History is this:

image

dshokouhi commented 4 months ago

Are there any companion app errors in the logs? You skipped over those in the issue template.

DarthSonic commented 4 months ago

Where can I find them?

Meanwhile there are many negative comments for the app in the play store because of several things not working anymore since the last updates.

So could be there was some change. Is there any way to get notification content otherwise?

dshokouhi commented 4 months ago

Where can I find them?

As mentioned in the issue template.

Settings > companion app > show and share logs

Meanwhile there are many negative comments for the app in the play store because of several things not working anymore since the last updates.

They can file issues for those and we can investigate.

DarthSonic commented 4 months ago

I meant for the app creating the notifications, not companion app 😉

In the logs I can see nothing related to notifications. The last notification was at 17:25 and this is the log of that time:

05-05 17:25:00.001 16631 16631 D SensorReceiver: Received intent: android.intent.action.TIME_TICK
05-05 17:25:00.004 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:00.024 16631 16631 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
05-05 17:25:00.035 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:00.036 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:00.146 16631 29136 D SensorReceiver: Nothing to update for server 1 (Home)
05-05 17:25:00.146 16631 29136 I SensorReceiver: Sensor updates and sync completed
05-05 17:25:02.567 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: ViewPostIme pointer 1
05-05 17:25:02.910 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: ViewPostIme pointer 0
05-05 17:25:02.967 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: ViewPostIme pointer 1
05-05 17:25:03.911 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:03.914 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:03.916 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:03.919 16631 29136 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
05-05 17:25:03.919 16631 29136 D WebSocketRepository: Sending message 1275: {type=ping, id=1275}
05-05 17:25:03.919 16631 29136 D WebSocketRepository: Message number 1275 sent
05-05 17:25:03.936 16631 14887 D WebSocketRepository: Websocket: onMessage (text)
05-05 17:25:03.937 16631 14887 D WebSocketRepository: Message number 1275 received
05-05 17:25:03.991 16631 16631 I BLASTBufferQueue_Java: update, w= 1080 h= 2340 mName = ViewRootImpl@bf60781[SettingsActivity] mNativeObject= 0xb400007a19adb900 sc.mNativeObject= 0xb400007b518eb0c0 format= -1 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3017 android.view.ViewRootImpl.relayoutWindow:10131 android.view.ViewRootImpl.performTraversals:4110 android.view.ViewRootImpl.doTraversal:3288 android.view.ViewRootImpl$TraversalRunnable.run:11344 android.view.Choreographer$CallbackRecord.run:1689 
05-05 17:25:03.991 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=true req=(1080,2340)0 dur=0 res=0x0 s={true 0xb400007b51611000} ch=false seqId=0
05-05 17:25:04.012 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: registerCallbackForPendingTransactions
05-05 17:25:04.016 16631 19418 I ViewRootImpl@bf60781[SettingsActivity]: mWNT: t=0xb400007a15e91a80 mBlastBufferQueue=0xb400007a19adb900 fn= 11527 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$6.onFrameDraw:5635 android.view.ViewRootImpl$2.onFrameDraw:2146 android.view.ThreadedRenderer$1.onFrameDraw:792 
05-05 17:25:04.017 16631 16631 I ImeTracker: io.homeassistant.companion.android:4ca64364: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT
05-05 17:25:04.017 16631 16631 I InputMethodManager_LC: closeCurrentInput: IInputMethodManagerGlobalInvoker.hideSoftInput
05-05 17:25:05.040 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: ViewPostIme pointer 0
05-05 17:25:05.128 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: ViewPostIme pointer 1
05-05 17:25:05.144 16631 16631 D ScrollView: initGoToTop
05-05 17:25:05.156 16631 16631 I BLASTBufferQueue_Java: update, w= 1080 h= 2340 mName = ViewRootImpl@bf60781[SettingsActivity] mNativeObject= 0xb400007a19adb900 sc.mNativeObject= 0xb400007b518eb0c0 format= -1 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3017 android.view.ViewRootImpl.relayoutWindow:10131 android.view.ViewRootImpl.performTraversals:4110 android.view.ViewRootImpl.doTraversal:3288 android.view.ViewRootImpl$TraversalRunnable.run:11344 android.view.Choreographer$CallbackRecord.run:1689 
05-05 17:25:05.156 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=true req=(1080,2340)0 dur=0 res=0x0 s={true 0xb400007b51611000} ch=false seqId=0
05-05 17:25:05.157 16631 16631 D ScrollView:  onsize change changed 
05-05 17:25:05.157 16631 16631 I ViewRootImpl@bf60781[SettingsActivity]: registerCallbackForPendingTransactions
dshokouhi commented 4 months ago

Those logs are only 5 seconds and do not indicate an update from the sensor was triggered.

DarthSonic commented 4 months ago

removed log due to security concerns of contents (exposed hostname)

dshokouhi commented 4 months ago

Uploading homeassistant_companion_log_4-5-2024_17-42-10.txt…

this is not a valid link, reloads the page :)

DarthSonic commented 4 months ago

removed log due to security concerns of contents (exposed hostname)

dshokouhi commented 4 months ago

these logs do not show the error we would expect to see.

https://github.com/home-assistant/android/blob/master/app/src/main/java/io/homeassistant/companion/android/sensors/NotificationSensorManager.kt#L346

the values provided look to be legitimate. Can you test with another app to see if that data comes in? Its quite possible the app you are using was updated and changed what text to show. What other attributes of the sensor has data? Might be easier to copy and paste from states tab

dshokouhi commented 4 months ago

Also look at the Active Notification sensor attributes to see if you see the data there

DarthSonic commented 4 months ago

image

DarthSonic commented 4 months ago

image

dshokouhi commented 4 months ago

what about the active notification sensor?

DarthSonic commented 4 months ago

WhatsApp for example is working. So this is an issue of the app that creates the notification. But how to overcome this if devs will not change that? Any solution for that?

dshokouhi commented 4 months ago

But how to overcome this if devs will not change that? Any solution for that?

first look at the active notification sensor as you may see more data there, you will see lots of attributes. Just keep the notification in the status bar.

if the app does not provide the data there is nothing we can do.

DarthSonic commented 4 months ago
android.appInfo_se.footballaddicts.livescore_1216097181
  ApplicationInfo{ecb53e3 se.footballaddicts.livescore}
  android.appInfo_se.footballaddicts.livescore_1961607648
  ApplicationInfo{4b411e0 se.footballaddicts.livescore}
  android.infoText_se.footballaddicts.livescore_1216097181
  null
  android.infoText_se.footballaddicts.livescore_1961607648
  null
  android.largeIcon_se.footballaddicts.livescore_1216097181
  null
  android.largeIcon_se.footballaddicts.livescore_1961607648
  null
  android.progressIndeterminate_se.footballaddicts.livescore_1216097181
  False
  android.progressIndeterminate_se.footballaddicts.livescore_1961607648
  False
  android.progressMax_se.footballaddicts.livescore_1216097181
  0
  android.progressMax_se.footballaddicts.livescore_1961607648
  0
  android.progress_se.footballaddicts.livescore_1216097181
  0
  android.progress_se.footballaddicts.livescore_1961607648
  0
  android.reduced.images_se.footballaddicts.livescore_1216097181
  True
  android.reduced.images_se.footballaddicts.livescore_1961607648
  True
  android.remoteInputHistory_se.footballaddicts.livescore_1216097181
  null
  android.remoteInputHistory_se.footballaddicts.livescore_1961607648
  null
  android.showChronometer_se.footballaddicts.livescore_1216097181
  False
  android.showChronometer_se.footballaddicts.livescore_1961607648
  False
  android.showWhen_se.footballaddicts.livescore_1216097181
  True
  android.showWhen_se.footballaddicts.livescore_1961607648
  True
  android.subText_se.footballaddicts.livescore_1216097181
  null
  android.subText_se.footballaddicts.livescore_1961607648
  null
  android.text_se.footballaddicts.livescore_1216097181
  null
  android.text_se.footballaddicts.livescore_1961607648
  Das Spiel hat begonnen!
  android.title_se.footballaddicts.livescore_1216097181
  null
  android.title_se.footballaddicts.livescore_1961607648
  1. FC Heidenheim – FSV Mainz
  se.footballaddicts.livescore_1216097181_category
  null
  se.footballaddicts.livescore_1216097181_channel_id
  match_start
  se.footballaddicts.livescore_1216097181_group_id
  1216097181
  se.footballaddicts.livescore_1216097181_is_clearable
  True
  se.footballaddicts.livescore_1216097181_is_ongoing
  False
  se.footballaddicts.livescore_1216097181_post_time
  1714930243364
  se.footballaddicts.livescore_1961607648_category
  null
  se.footballaddicts.livescore_1961607648_channel_id
  match_start
  se.footballaddicts.livescore_1961607648_group_id
  1216097181
  se.footballaddicts.livescore_1961607648_is_clearable
  True
  se.footballaddicts.livescore_1961607648_is_ongoing
  False

there is title_se and text_se properties with the data expected.

DarthSonic commented 4 months ago

android.text_se.footballaddicts.livescore_1961607648 android.title_se.footballaddicts.livescore_1961607648

dshokouhi commented 4 months ago

do you have 2 notifications posted from the app at the same time?

DarthSonic commented 4 months ago

no. only a single one that I can see.

dshokouhi commented 4 months ago

ok strange, looks like there are 2 notifications from the app both of which are in a group. Not really sure what we can do here but in the meantime the active notification sensor will give you the data you need.

dshokouhi commented 3 months ago

Closing as this is not something the app can fix, we simply show the latest notification data that we have received and if its blank then its blank unfortunately. There is an active notification sensor which will contain all notification data.