xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.23k stars 6.28k forks source link

Notification popups stop showing #23025

Open KOPRajs opened 1 year ago

KOPRajs commented 1 year ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

From time to time the notifications simply stops popping up in the top-right corner.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Notification being shown as usual.

Actual Behavior

Notification doesn't show.

Possible Fix

Can be fixed only by Kodi restart.

To Reproduce

Steps to reproduce the behavior:

There is no specific way how to reproduce this, however it seems to often happen when I'm switching between audio tracks in video (there are notifications showing the audio track number and language). Possibly when you cycle through the audio track too fast.

Debuglog

The debuglog can be found here: I can't reproduce the bug so no debug log, sorry.

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

KOPRajs commented 1 year ago

I've just tried it and even sending the notification using the kodi-send doesn't work: kodi-send -a "Notification(My header,This is my message)

Even with debug log enabled there is nothing in the log, when I try to send the notification.

fuzzard commented 1 year ago

Can you try and work out how to repro the situation. Ie does it happen after X notifications, does it occur after a system sleep, affect any other platform, etc.

With no logs (with anything useful) and no clear repro, going to be almost impossible to fix unless a dev stumbles across the same issue

lrusak commented 1 year ago

Can you try using kodi-send with the --notification switch?

KOPRajs commented 1 year ago

I'm well aware of that, I'll try to narrow it down as much as I can, but since it happened only like 3 times to me until now, it is not going to be easy.

For now: It is on CoreELEC 20.1. It was about 4 hours after a clean boot without any suspending or sleeping. There was a lot of update notifications prior to the issue as I have automatic addon updates disabled and I was checking for updates manually several times. It happens during the audio track toggling. You press "Toggle audio track" once and you get the notification, then you press the "Toggle audio track" again just a second later and while the track is toggled, the notification is not there any more. From this time on there are no notifications at all.

I'm currently running the device with the issue being there, so I can try whatever you want until next reboot. So far it seems that everything else except the notifications works.

Can you try using kodi-send with the --notification switch?

CoreELEC:~ # kodi-send --notification=Message
Sending: {'type': 'notification', 'content': 'Message'}

No notification shown either and nothing is being logged even when debug is enabled.

lrusak commented 1 year ago

Is the udp server even listening?

netstat -nlp | grep 9777
KOPRajs commented 1 year ago

Is the udp server even listening?

CoreELEC:~ # netstat -nlp | grep 9777
udp        0      0 :::9777                 :::*                                3737/kodi.bin

Yes, it is, but we are misleading from the real issue.

  1. The issue is not about kodi-send, I've only used it as another way to trigger the notification popup.
  2. Any notifications don't work. I've got no notifications from Python addons and I don't even have got a built-in notifications like the one when you "Toggle audio track" or "Toggle subtitles". It just fails silently without any error being logged or anything. The action itself works as usual, only the notification is missing.

Judging by the way it works there is probably some kind of queue for the notifications? It looks like the notifications are simply not being popped from the queue anymore.

KOPRajs commented 3 months ago

The issue still persists.

Recently, I've came across another usecase which triggers this issue for me: I'm using TvHeadend HTS client and I have the timer update notifications enabled. Everytime I create a new record timer in the TvHeadend a notification is shown in Kodi. When I create several record timers in TvHeadend quickly enough, notifications eventually stop working and Kodi gets to the same state as in OP (e.g. while planning record timers for a Formula 1 events during a weekend).

So the conclusion is, that it doesn't matter what is the source of the notification. Simply trying to display more notifications in a short period of time leads to a state where notifications are no longer being displayed. Everything else seems to work except there are no notifications shown until Kodi is restared.

Seems like a race condition when creating a new notification while another notification is being shown (or maybe while the other one is just being removed).