android icon indicating copy to clipboard operation
android copied to clipboard

Grouped notifications leave blank item behind

Open Renegade605 opened this issue 3 years ago • 15 comments

Home Assistant Android version: 2022.1.1-full

Android version: 11

Phone model: OnePlus 8 Pro

Home Assistant version: 2021.12.10

Last working Home Assistant release (if known): Unknown

Description of problem: When sending a notification that uses the "group" property in the service data, a blank notification is left behind after tapping on the correctly displayed initial notification. This appears to happen when group is the only property and when combinations of group, tag, and channel are used. Calling the service again with clear_notification message after this doesn't seem to clear the notification. Sending a new notification in the same group replaces this blank one.

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


Screenshot of problem: Screenshot_20220126-151851 (002)

Additional information:

Renegade605 avatar Jan 26 '22 22:01 Renegade605

We have some specific logging in place for notifications in general, can you please get us those logs?

dshokouhi avatar Jan 26 '22 22:01 dshokouhi

also please provide the service data you used for testing, it helps with replicating the issue :)

dshokouhi avatar Jan 26 '22 22:01 dshokouhi

Where can I find these logs?

Renegade605 avatar Jan 27 '22 00:01 Renegade605

Where can I find these logs?

The link with more details was actually in the template that you filled out. Go to Configuration > Companion App > Show and Share logs. Please make sure to reproduce the issue so we have the logs of the messages coming in and being dismissed as well as the service call you used in HA so we can see what parameters were used.

dshokouhi avatar Jan 27 '22 00:01 dshokouhi

The minimum service data required to see the problem is:

service: notify.mobile_app_oneplus_8_pro
data:
  message: test message
  data:
    group: test_group

But I also experienced it with more complicated notifications like:

service: notify.mobile_app_oneplus_8_pro
data:
  title: Crypto Miner
  message: Miner status is unavailable.
  data:
    group: notifications-nicehash
    tag: notification-nicehash-unknown
    channel: NiceHash
    clickAction: /lovelace-nicehash/0
    actions:
      - action: URI
        title: NiceHash Dashboard
        uri: https://www.nicehash.com/my/mining/rigs

Renegade605 avatar Jan 27 '22 00:01 Renegade605

Here are the logs I grabbed for sending a test notification. Sorry I saw "crash logs" and ignored it since I had no crash.

I tapped to notification to open the app, then I could see the error, then I cleared the blank notification, then navigated to the log page.

01-26 17:18:11.118  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:11.125  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 808 lines
01-26 17:18:11.125  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:11.955  8248 23685 D MessagingService: From: 331041709873
01-26 17:18:11.955  8248 23685 D MessagingService: Message data payload: {group=test_group, message=test message}
01-26 17:18:11.957  8248  8248 D MessagingService: Creating notification with following data: {group=test_group, message=test message}
01-26 17:18:11.959  8248  8248 D MessagingService: Show notification with tag "null" and id "-1729782410"
01-26 17:18:11.960  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:11.961  8248  8248 D MessagingService: Show group notification with tag "group_test_group" and id "-809037230"
01-26 17:18:11.981  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:12.698  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:12.705  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:12.707  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:12.712  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:12.712  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:12.958  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:14.190  8248  8248 D ViewRootImpl[SettingsActivity]: windowFocusChanged hasFocus=false inTouchMode=true
01-26 17:18:16.721  8248  8248 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@4d1b3f7[SettingsActivity]
01-26 17:18:16.722  8248  8248 D ViewRootImpl[SettingsActivity]: windowFocusChanged hasFocus=true inTouchMode=true
01-26 17:18:17.340  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:17.360  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:17.360  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:17.380  8248  8248 D PhoneWindow: setNavigationBarColor: ff111111
01-26 17:18:17.382  8248  8248 I System.out: recordForce value 5
01-26 17:18:17.382  8248  8248 D WebviewActivity: Current webview package com.google.android.webview and version 97.0.4692.98
01-26 17:18:17.391  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:17.403  8248  8248 V ViewRootImpl: The specified message queue synchronization  barrier token has not been posted or has already been removed
01-26 17:18:17.406  8248  8248 D ViewRootImpl[SettingsActivity]: windowFocusChanged hasFocus=false inTouchMode=true
01-26 17:18:17.407  8248  8248 D OpScreenModeManager: setRefreshRate parent com.google.android.exoplayer2.ui.AspectRatioFrameLayout{1717b85 V.E...... ......I. 0,0-0,0 #7f0a00e5 app:id/exo_content_frame} parent width 0 parent height 0 mRatio 1.2
01-26 17:18:17.407  8248  8248 D OpScreenModeManager: setRefreshRate view android.view.SurfaceView{3bd78fc G.E...... ......I. 0,0-0,0} viewRate 0 width 0 height 0
01-26 17:18:17.427  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:17.427  8248  8248 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@2e728e8[WebViewActivity]
01-26 17:18:17.428  8248  8248 D ViewRootImpl[WebViewActivity]: windowFocusChanged hasFocus=true inTouchMode=true
01-26 17:18:17.434  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:17.434  8248  8248 D UrlRepository: localUrl is: true and usesInternalSsid is: true
01-26 17:18:17.434  8248  8248 D UrlRepository: Using internal URL
01-26 17:18:17.464  8248 25712 D SensorWorker: Updating all Sensors.
01-26 17:18:17.465  8248 11214 I WM-Processor: Moving WorkSpec (532a9514-088d-43a3-b364-a5f7747c2213) to the foreground
01-26 17:18:17.468  8248 25712 D LastUpdate: Last update is SensorWorker
01-26 17:18:17.469  8248  8248 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
01-26 17:18:17.470  8248 25712 D ActivitySM: Unregistering for activity updates.
01-26 17:18:17.470  8248 25712 D ActivitySM: Registering for activity updates.
01-26 17:18:17.496  8248 25712 I AudioManager: In isSpeakerphoneOn(), calling application: io.homeassistant.companion.android
01-26 17:18:17.576  8248 25712 E SensorManager: registerListenerImpl sensorName:OnePlus Fusion Light Sensor,isWakeUpSensor:false,callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:17.577  8248 25712 D LightSensor: Light sensor listener registered
01-26 17:18:17.579  8248  8248 E SensorManager: unregisterListenerImpl callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:17.579  8248  8248 D LightSensor: Light sensor listener unregistered
01-26 17:18:17.616  8248  8248 D UrlRepository: localUrl is: true and usesInternalSsid is: true
01-26 17:18:17.616  8248  8248 D UrlRepository: Using internal URL
01-26 17:18:17.629  8248 25712 D NextAlarm: Next alarm is scheduled by com.oneplus.deskclock with trigger time 1643283900000
01-26 17:18:17.647  8248 14782 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":1}
01-26 17:18:17.678  8248 25712 E SensorManager: registerListenerImpl sensorName:pedometer  Non-wakeup,isWakeUpSensor:false,callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:17.685  8248 25712 D StepsSensor: Steps sensor listener registered
01-26 17:18:17.688  8248 25712 D StorageSensor: PATHS SD 1
01-26 17:18:17.691  8248 25712 D StorageSensor: PATH /storage/emulated/0/Android/data/io.homeassistant.companion.android/files is mounted true and removable is false
01-26 17:18:17.753  8248 25712 D UrlRepository: localUrl is: true and usesInternalSsid is: true
01-26 17:18:17.764  8248  8248 E SensorManager: unregisterListenerImpl callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:17.765  8248  8248 D StepsSensor: Steps sensor listener unregistered
01-26 17:18:17.784  8248  8308 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=532a9514-088d-43a3-b364-a5f7747c2213, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
01-26 17:18:17.840  8248  8248 I WM-SystemFgDispatcher: Stopping foreground service
01-26 17:18:17.880  8248 14782 D WebviewActivity: External bus {"type":"theme-update","id":2}
01-26 17:18:17.936  8248  8248 D WebviewActivity: Color from webview is "#102410-SPACER-#111111"
01-26 17:18:17.936  8248  8248 D WebviewActivity: Color from webview is "#102410-SPACER-#111111"
01-26 17:18:17.936  8248 23645 D WebViewPresenterImpl: Try getting color from webview color "#102410".
01-26 17:18:17.936  8248 23645 I WebViewPresenterImpl: Found color -15719408.
01-26 17:18:17.937  8248 23645 D WebViewPresenterImpl: Try getting color from webview color "#111111".
01-26 17:18:17.937  8248 23645 I WebViewPresenterImpl: Found color -15658735.
01-26 17:18:17.939  8248  8248 D PhoneWindow: setNavigationBarColor: ff111111
01-26 17:18:17.967  8248 14782 D WebviewActivity: External bus {"type":"config/get","id":3}
01-26 17:18:17.977  8248  8248 D WebviewActivity: externalBus({"id":3,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
01-26 17:18:18.024  8248  8248 D WebviewActivity: Callback null
01-26 17:18:18.024  8248  8248 D WebviewActivity: Color from webview is "#102410-SPACER-#111111"
01-26 17:18:18.024  8248  8248 D WebviewActivity: Color from webview is "#102410-SPACER-#111111"
01-26 17:18:18.024  8248 25712 D WebViewPresenterImpl: Try getting color from webview color "#102410".
01-26 17:18:18.025  8248 25712 I WebViewPresenterImpl: Found color -15719408.
01-26 17:18:18.025  8248 25712 D WebViewPresenterImpl: Try getting color from webview color "#111111".
01-26 17:18:18.025  8248 25712 I WebViewPresenterImpl: Found color -15658735.
01-26 17:18:18.026  8248  8248 D PhoneWindow: setNavigationBarColor: ff111111
01-26 17:18:20.600  8248  8248 D ViewRootImpl[WebViewActivity]: windowFocusChanged hasFocus=false inTouchMode=true
01-26 17:18:25.506  8248  8248 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@2e728e8[WebViewActivity]
01-26 17:18:25.506  8248  8248 D ViewRootImpl[WebViewActivity]: windowFocusChanged hasFocus=true inTouchMode=true
01-26 17:18:25.509  8248  8248 D UrlRepository: localUrl is: true and usesInternalSsid is: true
01-26 17:18:25.509  8248  8248 D UrlRepository: Using internal URL
01-26 17:18:28.130  8248 14782 D WebviewActivity: External bus {"type":"config_screen/show","id":4}
01-26 17:18:28.142  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:28.159  8248  8248 D UrlRepository: Using external URL
01-26 17:18:28.160  8248  8248 D UrlRepository: Using external URL
01-26 17:18:28.160  8248  8248 D UrlRepository: Using internal URL
01-26 17:18:28.160  8248  8248 D UrlRepository: Using internal URL
01-26 17:18:28.167  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:28.168  8248  8248 V ViewRootImpl: The specified message queue synchronization  barrier token has not been posted or has already been removed
01-26 17:18:28.170  8248  8248 D ViewRootImpl[WebViewActivity]: windowFocusChanged hasFocus=false inTouchMode=true
01-26 17:18:28.200  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.203  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 42 lines
01-26 17:18:28.203  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.206  8248  8248 W Choreographer: Already have a pending vsync event.  There should only be one at a time.
01-26 17:18:28.235  8248  8248 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@64646f4[SettingsActivity]
01-26 17:18:28.236  8248  8248 D ViewRootImpl[SettingsActivity]: windowFocusChanged hasFocus=true inTouchMode=true
01-26 17:18:28.237  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.242  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 20 lines
01-26 17:18:28.242  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.269  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.270  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 8 lines
01-26 17:18:28.270  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.270  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.282  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 32 lines
01-26 17:18:28.282  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.287  8248 25712 D SensorWorker: Updating all Sensors.
01-26 17:18:28.288  8248  8308 I WM-Processor: Moving WorkSpec (2a1e8a14-1c0f-488c-a15b-56a3331be3a0) to the foreground
01-26 17:18:28.293  8248 25712 D LastUpdate: Last update is SensorWorker
01-26 17:18:28.297  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:28.299  8248 25712 D ActivitySM: Unregistering for activity updates.
01-26 17:18:28.299  8248 25712 D ActivitySM: Registering for activity updates.
01-26 17:18:28.304  8248  8248 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
01-26 17:18:28.307  8248 23689 E sqlite3_android: ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
01-26 17:18:28.320  8248 25712 I AudioManager: In isSpeakerphoneOn(), calling application: io.homeassistant.companion.android
01-26 17:18:28.372  8248 25712 E SensorManager: registerListenerImpl sensorName:OnePlus Fusion Light Sensor,isWakeUpSensor:false,callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:28.373  8248 25712 D LightSensor: Light sensor listener registered
01-26 17:18:28.373  8248  8248 E SensorManager: unregisterListenerImpl callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:28.374  8248  8248 D LightSensor: Light sensor listener unregistered
01-26 17:18:28.404  8248 25712 D NextAlarm: Next alarm is scheduled by com.oneplus.deskclock with trigger time 1643283900000
01-26 17:18:28.437  8248 25712 E SensorManager: registerListenerImpl sensorName:pedometer  Non-wakeup,isWakeUpSensor:false,callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:28.445  8248 25712 D StepsSensor: Steps sensor listener registered
01-26 17:18:28.448  8248  8248 E SensorManager: unregisterListenerImpl callingApp: io.homeassistant.companion.android,callingPid:8248,callingUid:10026
01-26 17:18:28.449  8248  8248 D StepsSensor: Steps sensor listener unregistered
01-26 17:18:28.452  8248 25712 D StorageSensor: PATHS SD 1
01-26 17:18:28.455  8248 25712 D StorageSensor: PATH /storage/emulated/0/Android/data/io.homeassistant.companion.android/files is mounted true and removable is false
01-26 17:18:28.475  8248 25712 D UrlRepository: localUrl is: true and usesInternalSsid is: true
01-26 17:18:28.499  8248  8438 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=2a1e8a14-1c0f-488c-a15b-56a3331be3a0, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
01-26 17:18:28.501  8248  8248 I WM-SystemFgDispatcher: Stopping foreground service
01-26 17:18:28.814  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:28.824  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 42 lines
01-26 17:18:28.824  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.072  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.080  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 2 lines
01-26 17:18:29.080  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.097  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.098  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.098  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 1 line
01-26 17:18:29.098  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.112  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.113  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 6 lines
01-26 17:18:29.113  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.139  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.163  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 4 lines
01-26 17:18:29.163  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.171  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:29.570  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 76 lines
01-26 17:18:29.570  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:30.990  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.107  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 90 lines
01-26 17:18:31.107  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.113  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.164  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 88 lines
01-26 17:18:31.164  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.165  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.165  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.165  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.165  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.165  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:31.429  8248  8248 I chatty  : uid=10026(io.homeassistant.companion.android) identical 388 lines
01-26 17:18:31.429  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:33.939  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:33.939  8248  8248 E mpanion.androi: Invalid ID 0x00000000.
01-26 17:18:33.982  8248 25712 D LogcatReader: Read logcat for pid 8248

Renegade605 avatar Jan 27 '22 00:01 Renegade605

Thanks for getting the logs. Its also 3 backticks above and below the code blocks to render them with proper spacing :)

I am unable to reproduce on my pixel 6 using the steps. The notification is removed when I tap on it. I also don't see anything that would be helpful in the logs as tapping on a notification does not hit our cleared event so we don't have any further logging here.

What additional troubleshooting steps have you tried?

dshokouhi avatar Jan 27 '22 00:01 dshokouhi

Thanks for the tip!

I'm open to helping with troubleshooting but I'm not sure where to go from here. Once I traced the problem to using the group and couldn't find any further info with a Google search I came here to open this report.

Renegade605 avatar Jan 27 '22 00:01 Renegade605

Can you try these steps just to rule out bad data please? https://companion.home-assistant.io/docs/troubleshooting/faqs/#starting-fresh-with-the-android-app they may or may not work but usually when notifications behave oddly this helps

dshokouhi avatar Jan 27 '22 01:01 dshokouhi

This had no effect.

Renegade605 avatar Jan 27 '22 01:01 Renegade605

Thanks for checking that and getting us all the details we need. As I cannot reproduce this issue we will need a developer who is able to reproduce it to fix this.

dshokouhi avatar Jan 27 '22 01:01 dshokouhi

I understand.

Some other things that might be relevant:

  • Fingerprint auth is on in the app.
  • clickAction does not affect this, whether present or not, or whether linking to the app or to a webpage.

Renegade605 avatar Jan 27 '22 02:01 Renegade605

having a very similar issue here, where i'm getting a blank unclickable notification (initial "correct" notification isn't even shown).

  • Android version: 12
  • Phone model: Samsung Galaxy S21 (mobile_app_sm_g991w in the logs)
  • Home assistant version: 2022.3.3
  • Companion app version: 2022.2.0-full
  • Companion app websocket settings: Always

A bit different from the above case in that I'm trying to reproduce functionality from this template in Node-Red. You can see in my screencaps below there's two notifications. The blue one is from the aforementioned template, whereas the purple one is from Node-Red.

A few things about this are bizarre:

  1. Sometimes the HA automation notification comes through just fine at the same time as the problematic Node Red notification. Sometimes it's the other way around. See screencaps below for both occurrences showing (blue is HA, purple is NR).
  2. My companion app notification history shows the notification text, so it's clearly being received (see screencap below).
  3. My girlfriend's phone (Samsung Galaxy S10e, websockets always) has shown the notification correctly once, and this morning showed it in the problematic way described by this post.

screenshots: image

image

image

home assistant server logs showing both sets of notifications, obtained via grep "domain=notify, service=mobile_app" home-assistant.log:

2022-03-14 08:15:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g991w, service_data=message=person detected by doorbell, data=tag=1647260096.470608-xelhxt, image=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, color=purple, actions=[{'action': 'URI', 'title': 'Live Stream', 'uri': 'https://(redacted hostname).duckdns.org/lovelace/doorbell'}], ttl=0, priority=high, group=motion-alerts, channel=Motion alerts>
2022-03-14 08:15:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g970w, service_data=message=person detected by doorbell, data=tag=1647260096.470608-xelhxt, image=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, color=purple, actions=[{'action': 'URI', 'title': 'Live Stream', 'uri': 'https://(redacted hostname).duckdns.org/lovelace/doorbell'}], ttl=0, priority=high, group=motion-alerts, channel=Motion alerts>
2022-03-14 08:15:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g991w, service_data=target=0244e302ae920b76bc30d5d135aef711676f983320bc5e0d14ae12d597735978, message=A Person was detected on the Doorbell camera., data=tag=1647260096.470608-xelhxt, group=frigate-notification-doorbell, image=/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, ttl=3600000, priority=normal, url=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, attachment=url=/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg, push=interruption-level=active, actions=[{'action': 'URI', 'title': 'View Clip', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4'}, {'action': 'URI', 'title': 'View Snapshot', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/snapshot.jpg'}, {'action': 'silence-doorbell', 'title': 'Silence New Notifications', 'destructive': True}]>
2022-03-14 08:15:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g970w, service_data=target=b292744d71c52ab6a7b3e27884fae1d6317cfec9beb3855862a5f762bf6b6223, message=A Person was detected on the Doorbell camera., data=tag=1647260096.470608-xelhxt, group=frigate-notification-doorbell, image=/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, ttl=3600000, priority=normal, url=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4, attachment=url=/api/frigate/notifications/1647260096.470608-xelhxt/thumbnail.jpg, push=interruption-level=active, actions=[{'action': 'URI', 'title': 'View Clip', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/doorbell/clip.mp4'}, {'action': 'URI', 'title': 'View Snapshot', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647260096.470608-xelhxt/snapshot.jpg'}, {'action': 'silence-doorbell', 'title': 'Silence New Notifications', 'destructive': True}]>


2022-03-14 09:08:13 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g991w, service_data=message=person detected by doorbell, data=tag=1647263292.837479-esxkfl, image=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, color=purple, actions=[{'action': 'URI', 'title': 'Live Stream', 'uri': 'https://(redacted hostname).duckdns.org/lovelace/doorbell'}], ttl=0, priority=high, group=motion-alerts, channel=Motion alerts>
2022-03-14 09:08:13 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=mobile_app_sm_g991w, service_data=target=0244e302ae920b76bc30d5d135aef711676f983320bc5e0d14ae12d597735978, message=A Person was detected on the Doorbell camera., data=tag=1647263292.837479-esxkfl, group=frigate-notification-doorbell, image=/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, ttl=3600000, priority=normal, url=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, attachment=url=/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg, push=interruption-level=active, actions=[{'action': 'URI', 'title': 'View Clip', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4'}, {'action': 'URI', 'title': 'View Snapshot', 'uri': 'https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/snapshot.jpg'}, {'action': 'silence-doorbell', 'title': 'Silence New Notifications', 'destructive': True}]>

android logs for latest occurrence (unfortunately my logs dont go far back enough to cover the earlier occurrence this morning)

03-14 09:08:07.150  3438 24353 D WebSocketRepository: Sending message 1604: {type=ping, id=1604}
03-14 09:08:07.150  3438 24353 D WebSocketRepository: Message number 1604 sent
03-14 09:08:07.165  3438  3756 D WebSocketRepository: Websocket: onMessage (text)
03-14 09:08:07.167  3438  3756 D WebSocketRepository: Message number 1604 received: {"id":1604,"type":"pong"}
03-14 09:08:13.246  3438  3756 D WebSocketRepository: Websocket: onMessage (text)
03-14 09:08:13.247  3438  3756 D WebSocketRepository: Message number 1553 received: {"id":1553,"type":"event","event":{"message":"person detected by doorbell","data":{"tag":"1647263292.837479-esxkfl","image":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android","clickAction":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4","color":"purple","actions":[{"action":"URI","title":"Live Stream","uri":"https://(redacted hostname).duckdns.org/lovelace/doorbell"}],"ttl":0,"priority":"high","group":"motion-alerts","channel":"Motion alerts"},"hass_confirm_id":"fd132a6b3e2b3397b13bbd8df9975407"}}
03-14 09:08:13.247  3438  3756 D WebSocketRepository: Websocket: onMessage (text)
03-14 09:08:13.248  3438  3756 D WebSocketRepository: Message number 1553 received: {"id":1553,"type":"event","event":{"message":"A Person was detected on the Doorbell camera.","data":{"tag":"1647263292.837479-esxkfl","group":"frigate-notification-doorbell","image":"/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android","clickAction":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4","ttl":3600000,"priority":"normal","url":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4","attachment":{"url":"/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg"},"push":{"interruption-level":"active"},"actions":[{"action":"URI","title":"View Clip","uri":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4"},{"action":"URI","title":"View Snapshot","uri":"https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/snapshot.jpg"},{"action":"silence-doorbell","title":"Silence New Notifications","destructive":true}]},"hass_confirm_id":"a0d310f5647c2bab607ef688f0507859"}}
03-14 09:08:13.251  3438  3540 D WebSocketRepository: Sending message 1605: {type=mobile_app/push_notification_confirm, webhook_id=0244e302ae920b76bc30d5d135aef711676f983320bc5e0d14ae12d597735978, confirm_id=fd132a6b3e2b3397b13bbd8df9975407, id=1605}
03-14 09:08:13.251  3438  3540 D WebSocketRepository: Message number 1605 sent
03-14 09:08:13.257  3438  3756 D WebSocketRepository: Websocket: onMessage (text)
03-14 09:08:13.257  3438  3756 D WebSocketRepository: Message number 1605 received: {"id":1605,"type":"result","success":true,"result":null}
03-14 09:08:13.261  3438  3487 D WebSocketRepository: Sending message 1606: {type=mobile_app/push_notification_confirm, webhook_id=0244e302ae920b76bc30d5d135aef711676f983320bc5e0d14ae12d597735978, confirm_id=a0d310f5647c2bab607ef688f0507859, id=1606}
03-14 09:08:13.261  3438  3487 D WebSocketRepository: Message number 1606 sent
03-14 09:08:13.261  3438  3438 D MessagingService: Creating notification with following data: {tag=1647263292.837479-esxkfl, image=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, color=purple, action_1_key=URI, action_1_title=Live Stream, action_1_uri=https://(redacted hostname).duckdns.org/lovelace/doorbell, ttl=0, priority=high, group=motion-alerts, channel=Motion alerts, message=person detected by doorbell}
03-14 09:08:13.265  3438  3756 D WebSocketRepository: Websocket: onMessage (text)
03-14 09:08:13.266  3438  3756 D WebSocketRepository: Message number 1606 received: {"id":1606,"type":"result","success":true,"result":null}
03-14 09:08:13.270  3438  3438 D UrlRepository: localUrl is: true and usesInternalSsid is: true
03-14 09:08:13.270  3438  3438 D UrlRepository: Using internal URL
03-14 09:08:13.270  3438  3438 D MessagingService: Creating notification with following data: {tag=1647263292.837479-esxkfl, group=frigate-notification-doorbell, image=/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg?format=android, clickAction=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, ttl=3600000, priority=normal, url=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, attachment={url=/api/frigate/notifications/1647263292.837479-esxkfl/thumbnail.jpg}, push={interruption-level=active}, action_1_key=URI, action_1_title=View Clip, action_1_uri=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/doorbell/clip.mp4, action_2_key=URI, action_2_title=View Snapshot, action_2_uri=https://(redacted hostname).duckdns.org/api/frigate/notifications/1647263292.837479-esxkfl/snapshot.jpg, action_3_key=silence-doorbell, action_3_title=Silence New Notifications, action_3_uri=null, message=A Person was detected on the Doorbell camera.}
03-14 09:08:13.277  3438  3438 D UrlRepository: localUrl is: true and usesInternalSsid is: true
03-14 09:08:13.277  3438  3438 D UrlRepository: Using internal URL
03-14 09:08:13.281  3438  3487 D UrlRepository: localUrl is: true and usesInternalSsid is: true
03-14 09:08:13.281  3438  3487 D UrlRepository: Using internal URL
03-14 09:08:13.356  3438  3438 D MessagingService: Show notification with tag "1647263292.837479-esxkfl" and id "487771344"
03-14 09:08:13.372  3438  3438 D MessagingService: Show group notification with tag "group_frigate-notification-doorbell" and id "-1266297362"
03-14 09:08:13.387  3438  3447 I mpanion.androi: Background young concurrent copying GC freed 220806(11MB) AllocSpace objects, 91(2920KB) LOS objects, 37% free, 24MB/39MB, paused 2.177ms,115us total 123.653ms
03-14 09:08:13.392  3438  3448 D InputTransport: Input channel destroyed: 'ClientS', fd=251
03-14 09:08:13.393  3438  3448 D InputTransport: Input channel destroyed: 'ClientS', fd=284
03-14 09:08:13.395  3438  3448 D InputTransport: Input channel destroyed: 'ClientS', fd=120
03-14 09:08:13.395  3438  3448 D InputTransport: Input channel destroyed: 'ClientS', fd=141
03-14 09:08:13.454  3438  3438 D MessagingService: Show notification with tag "1647263292.837479-esxkfl" and id "487771344"
03-14 09:08:13.473  3438  3438 D MessagingService: Show group notification with tag "group_motion-alerts" and id "-314551602"

ekzor avatar Mar 14 '22 13:03 ekzor

Oops, previously posted from my work account by accident. Sorry for the noise!

In case anyone stumbles on this later, I think I figured out the cause of my issue: both notifications had the same tag (frigate event id) and that was leading to a race condition of sorts.

ekzor avatar Mar 14 '22 17:03 ekzor

In case anyone stumbles on this later, I think I figured out the cause of my issue: both notifications had the same tag (frigate event id) and that was leading to a race condition of sorts.

When you use the same tag the notification will be replaced with whatever you are sending. If the notification comes up blank but you can see that notification history shows the correct text then please create a new issue and give us all the steps to reproduce.

dshokouhi avatar Mar 15 '22 16:03 dshokouhi

just wanted to check and see if this is still an issue given the recent comments here.

dshokouhi avatar Dec 22 '22 04:12 dshokouhi

just wanted to check and see if this is still an issue given the recent comments here.

Behaviour hasn't changed for me.

Renegade605 avatar Dec 22 '22 17:12 Renegade605

@dshokouhi So I experience the same issue, and I think I found some patterns... I only noticed the problem after I started using a entering/leaving zone notification - and after they got grouped, they would be "sticky" and could only be dismissed by expanding the group and swiping individual ones. But if I just went to dev tools and sent a bunch of simple test notifications in a row, they would get grouped, but I could swipe off the whole group without expanding at all. So I poked around, using the dev tools to call the service, testing several different patterns of multiple notifications grouped together. I thought it might be related to the message template my automation used, or maybe how the notifications were different in terms of message and title content. So I tested several combinations of title/message/message length in a group, and here are my results. In every one of the test scenarios below, I sent at least five notifications, then unlocked my phone, swiped down to see notifications, and tried swiping the whole group. To show you exactly what I was sending, I am showing the exact YAML, and using a pipe | character as a delimiter to just show the sequence of different values I sent out, in a compact way here. Oh, another note: in the notifications bar with the icons on top of the screen, notification groups that were dismissible had a white icon, notification groups represented by a blue HA icon were NOT dismissible. Phone is OnePlus 7 Pro running Android 12, Companion app version is beta-3146-9d8055f8-full My notifications are also reflected on my Wear OS companion on a galaxy watch 5 pro, if that matters at all

OK, here we go....

Pattern 1 - short title, short message, all same content (5 notifications message "A" and tile "B" )

service: notify.mobile_app_my_phone
data:
  message: A | A | A | A | A
  title: B | B | B | B | B

RESULT: group is dismissible

#######

Pattern 2 - short title, short message, message content changes

service: notify.mobile_app_my_phone
data:
  message: A | B | C | D | E
  title: A | A | A | A | A

RESULT: group is dismissible

#######

Pattern 3 - short title, short message, title content changes

service: notify.mobile_app_my_phone
data:
  message: A | A | A | A | A
  title: A | B | C | D | E

RESULT: group is dismissible

#######

Pattern 4 - short title, long message, title content changes

service: notify.mobile_app_my_phone
data:
  message: This is a longer message that needs to be abbreviated a bit in the notification
  title: A | B | C | D | E

RESULT: group is NOT dismissible

#######

Pattern 5 - long title, short message, message content changes

service: notify.mobile_app_my_phone
data:
  message: A | B | C | D | E
  title: This is a longer title that needs to be abbreviated a bit in the notification

RESULT: group is dismissible

#######

Pattern 6 - long title, short message, all same content

service: notify.mobile_app_my_phone
data:
  message: A
  title: This is a longer title that needs to be abbreviated a bit in the notification

RESULT: group is dismissible

#######

Pattern 7 - short title, long message, all same content

service: notify.mobile_app_my_phone
data:
  message: This is a longer message that needs to be abbreviated a bit in the notification
  title: A

RESULT: group is NOT dismissible

#######

Pattern 8 - short title, long message, title content changes

service: notify.mobile_app_my_phone
data:
  message: This is a longer title that needs to be abbreviated a bit in the notification
  title: A | B | C | D | E

RESULT: group is NOT dismissible

#######

Pattern 9 - long title, short message, message content changes

service: notify.mobile_app_my_phone
data:
  message: A | B | C | D | E
  title: This is a longer title that needs to be abbreviated a bit in the notification

RESULT: group is NOT dismissible

root-hal9000 avatar Feb 15 '23 04:02 root-hal9000

To be clear, I am referring to issue #1877 where you can't swipe away grouped notifications, but the comment there said to come here if you're having that issue

root-hal9000 avatar Feb 15 '23 06:02 root-hal9000

@ffcruz85 this issue is different and not related to the ability to swipe notifications away.

Renegade605 avatar Feb 15 '23 13:02 Renegade605

I will post on the other closed one then, I wasn't sure why it referenced this one. Thanks

root-hal9000 avatar Feb 15 '23 14:02 root-hal9000

I will post on the other closed one then, I wasn't sure why it referenced this one. Thanks

Please do not comment on old and closed issues instead open a new one like the comment you saw suggested. The comment said to check this issue to see if it's the same which it is not.

dshokouhi avatar Feb 15 '23 15:02 dshokouhi

just checking in to see if this is still an issue with the latest version

dshokouhi avatar Aug 10 '23 18:08 dshokouhi

Hi @dshokouhi - this has no longer been an issue for me. It has been quite a while, many HA versions, phone change (OnePlus 7 Pro to OnePlus 11), and Android version from 12 to 13 - so unfortunately I can't quite put my finger on when this behavior stopped, but it did. Sorry i had not followed up earlier.

root-hal9000 avatar Aug 10 '23 23:08 root-hal9000

No change for me. Problem with the OnePlus 8 Pro or Android 11?

Renegade605 avatar Aug 10 '23 23:08 Renegade605

No change for me. Problem with the OnePlus 8 Pro or Android 11?

I personally never saw it on Android 11

dshokouhi avatar Aug 10 '23 23:08 dshokouhi