Closed djreedoo closed 3 months ago
A debug log is required.
The latest version has indeed made the playlist more buggy than it already was. I'll get around to posting logs when I can.
@neo-neo1 - perhaps, but I don't experience any issues with it, so without a log can't do much.
@djreedoo - FYI when you edit a post no notifications are sent, so I didn't see your log until someone else commented in this issue. Also your log has also been truncated because you have converted it to PDF without wrapping, next time just share a link to wherever you have uploaded the log.
As to the issues you are reporting:
When adding YouTube titles from my phone to queue, I can see them added in queue in Yatse but when the current title ends it returns to homescreen.
There is nothing shown in the log indicating anything is being queued, which is probably why nothing plays after the current title ends - nothing has been queued to be played after the current title. I don't use Yatse, so I don't know what it is doing, but whatever it is trying doesn't appear to be working. If you produce a debug log then that might provide more useful information, otherwise suggest raising an issue with Yatse.
If I launch a whole playlist, I have an error message
The error message is that your API key is invalid. Check it and make sure it is entered into the plugin settings correctly.
If I launch a title while already playing one, it stops ans returns to homescreen.
There is nothing shown in the log indicating this is happening. Are you trying to do this from Yatse or from within the plugin?
I have the same issue. Here is a log when I started one, and then put another in queue. The first one played ok, but then it returned to the start screen instead of playing the second one.
Thanks, but I know why the playback may stop. I need to understand what leads up to that occurring, because I don't have the same issue.
I specifically need a debug log. It needs to include the period from when a video is queued, to when it fails to play.
@tbjorheim - from your log, how many videos were in the playlist? Was it only two items, or more?
All - does the issue only occur when queueing a video while already playing the last video in a playlist? Does playback fail for any video that has not been queued in the last position of the playlist?
@neo-neo1 - perhaps, but I don't experience any issues with it, so without a log can't do much.
@djreedoo - FYI when you edit a post no notifications are sent, so I didn't see your log until someone else commented in this issue. Also your log has also been truncated because you have converted it to PDF without wrapping, next time just share a link to wherever you have uploaded the log.
As to the issues you are reporting:
When adding YouTube titles from my phone to queue, I can see them added in queue in Yatse but when the current title ends it returns to homescreen.
There is nothing shown in the log indicating anything is being queued, which is probably why nothing plays after the current title ends - nothing has been queued to be played after the current title. I don't use Yatse, so I don't know what it is doing, but whatever it is trying doesn't appear to be working. If you produce a debug log then that might provide more useful information, otherwise suggest raising an issue with Yatse.
If I launch a whole playlist, I have an error message
The error message is that your API key is invalid. Check it and make sure it is entered into the plugin settings correctly.
If I launch a title while already playing one, it stops ans returns to homescreen.
There is nothing shown in the log indicating this is happening. Are you trying to do this from Yatse or from within the plugin?
I use it from Yatse but Kore experienced the same issue. I changed the Api Key and it now works in any situations described previously. The remaining problem compared to a few month ago is that it takes 5 to 10s between titles it used to be 2 to 3. Thank you for your time and kindness.
Good to hear the problem is resolved. I'll leave this open though, would like to hear from the others who indicated they had similar problems.
The remaining problem compared to a few month ago is that it takes 5 to 10s between titles it used to be 2 to 3.
This is fixed in https://github.com/anxdpanic/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.1
Thank you for your time and kindness.
No problem
@MoojMidge In the previous example I had two videos, but it's the same issue even if I add two or more. And it does not only fail during the last video in playlist. I'm only able to play one, then it stops. Even if I add many to the queue.
I enabled debug log and did the following:
Added video nr 1. When the video has started playing, I added two more. I checked the queue in Yatse and all three items are in the queue.
But when the first video ended, it stops playing and return back to the Kodi interface.
New log including debug log: https://paste.kodi.tv/isimiporuf.kodi
@MoojMidge In the previous example I had two videos, but it's the same issue even if I add two or more. And it does not only fail during the last video in playlist. I'm only able to play one, then it stops. Even if I add many to the queue.
Yep, that's what I meant. The key is that you are queueing up another video while currently playing the last video in the playlist, as opposed to queueing up a whole bunch of videos all in one go, or queueing multiple videos one by one while not playing anything, or playing an existing playlist.
I enabled debug log and did the following:
Thanks. Strangely enough the debug log still doesn't show anything being queued. May need JSON-RPC or Announcer component debug logging for that. Regardless, seems to match what I think the problem may be.
Can you see if https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.2 resolves the problem?
Can you see if https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.2 resolves the problem?
Tried this, and it does not work quite as it should.
If I start one video, and then queue another, the second video starts but it seems to start in the middle (maybe where I stopped it last time).
If I start one video, and then queue two more, it plays the first one and then the last one (it skipped the second one). In this case it's also start in the middle of the video, and not from start.
I haven't tested with adding a playlist. The way I use this is mainly to watch music videos. I start one, and then put others in queue. I have used this for a long time, and it has been working perfectly (only issue I must not send a new video to the queue when it's buffering between songs, then Kodi crashes). I also like the flexibility with this way of using it, since it's possible to send to the queue from multiple devices. But after the 7.0.5 update, something must have been changed. It was then it stopped working.
Let me know if you need any more information or testing. I really like it to get working again. :)
only issue I must not send a new video to the queue when it's buffering between songs, then Kodi crashes
The reason why the queueing is not working as it should is because of a workaround to avoid this exact problem.
If I start one video, and then queue another, the second video starts but it seems to start in the middle (maybe where I stopped it last time).
This can be fixed (maybe)
If I start one video, and then queue two more, it plays the first one and then the last one (it skipped the second one). In this case it's also start in the middle of the video, and not from start.
Can you get me a debug log of this? Can't seem to replicate it myself
Can confirm everything stated above. For me it occurs around 25% of the time so replicating it to get a debug log isn't straightforward.
Can confirm everything stated above. For me it occurs around 25% of the time so replicating it to get a debug log isn't straightforward.
At this stage, even a non-debug log may be useful.
Alternatively can use the following in your advancedsettings.xml
and leave it logging until the problem occurs. Can then remove it from advancedsettings.xml
. See https://kodi.wiki/view/Log_file/Advanced for further details on usage.
<advancedsettings version="1.0">
<loglevel hide="true">1</loglevel>
</advancedsettings>
Another attempt at fixing the crashes without messing with playlists too much: https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.2
Same version number as before, but has been updated. See if that works any better.
Another attempt at fixing the crashes without messing with playlists too much: https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.2
Same version number as before, but has been updated. See if that works any better.
Installed this, and now things seems to work mostly as it should. :)
But when testing, two small issues occurred:
One of the videos I have watched before started in the middle, as mentioned before. But only the first time. When I watched the same video again, it was from the beginning. Maybe just a temporary issue.
I watched like 20 videos when testing it, and two times it stopped with an error. But I wasn't fast enough to see what the error said, and I can't find it in the log. Might be some temporary error, since the exact same video worked when I tried again later. I don't know how the plugin is set up to work if there is an error playing an item in the playlist. The best way would be to just skip the item and continue on the next item, but in these cases it stopped. I know that at least one of the times it happened, there was more items in the playlist.
But in overall, it works a lot better now. So thanks a lot for fixing this. :)
2. I don't know how the plugin is set up to work if there is an error playing an item in the playlist. The best way would be to just skip the item and continue on the next item
This is what can lead to Kodi crashing as it ends up being very similar to this:
only issue I must not send a new video to the queue when it's buffering between songs, then Kodi crashes
The purpose of the workaround is to only continue when it is safe to do so by clearing the playlist and then reloading it a bit later when Kodi is no longer busy. If it just stops then that means the playlist wasn't reloaded. If you provide the logs can try and see why that may have occurred.
Another attempt at fixing the crashes without messing with playlists too much: https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.6%2Bbeta.2
Same version number as before, but has been updated. See if that works any better.
So far it seems 7.0.6 beta 2 alleviated the problem (knock on wood).
However, there's another intermittent queue adjacent problem which still occurs on 7.0.6 beta 2
If I start a video from queue then minimize it to navigate elsewhere in Kodi during that initial minimization of the video it'll start playing the next video in queue. Almost as if the playing video crashes and it starts playing the next video in queue. This doesn't occur often, about once in 25 tries.
Really need a log to do anything. Even a non-debug log will identify if this is caused by the crash workaround or something else.
Closing this with the release of v7.0.6+beta.2. If there are further related issues create a new issue and post a debug log.
Thank you very much!
@MoojMidge I still have problems with this, i have try all sort of things downgraded coreelec from 21 nightly to regular then from regular to 20 (because I thought that was the problem, and that something changed over time in kodi itself) and still cant start video playing from yatse queuing or even start playing new video when old one is still running, this all worked for long time and now its not.
Can't do much without a debug log
Can't do much without a debug log
I have entire log with almost all options enabled its [REDACTED]mb in size, but i see that its contains all sorts of personal info like ip and so, so im not comfortable uploading that publicly. How can i send it to you privately?
@Doktor-X - I tried editing your previous message to remove the size from the text and it appears to have worked, as that information is now gone from the message, and the edit history.
You can go https://gist.github.com/ and create a secret gist with your log. Note that not all of the log is required, just the part from when you queue a video and/or try to start playing it.
You can then add the link to the secret gist here and I can delete it once I have opened it. You can then delete the gist as well.
Note that there is still a chance that someone can see the link before I delete it.
Alternatively you can try and contact me on Discord. My username is the same as on Github.
Alternatively you can try and contact me on Discord. My username is the same as on Github.
I have send you frend request, since we dont have any common server it seems
we dont have any common server it seems
I only got an account specifically because of this plugin :)
Thanks for the log, very helpful, also identified a couple of other unrelated issue too.
Regarding the problem you identified, your log indicates that it is not quite the same as this issue, although closely related.
This issue is about queuing, while your log shows Yatse clearing the playlist before adding another item to the new empty playlist, rather than queuing additional items to the currently playing playlist.
This is not dissimilar to what Kodi does internally, but what is different is that it is much slower and therefore creates a busy dialog overlapping the period in which the plugin is trying to start playback, which is what triggers the busy dialog crash workaround.
Have you had crashes doing this kind of thing previously, or has it worked without issues?
The current logic in the plugin is to stop playback based on an assumption that the currently playing item had already been played, based on its current position within the playlist, and should not be repeated. This is because the plugin has no notification of the playlist being cleared and the first item being swapped out from underneath it, so even though the position has not changed, the playlist item has.
To those experiencing this problem, or who have experienced it previously, try https://github.com/MoojMidge/plugin.video.youtube/releases/tag/v7.0.7%2Bbeta.1 and see if it improves things or makes things worse
This issue is about queuing, while your log shows Yatse clearing the playlist before adding another item to the new empty playlist, rather than queuing additional items to the currently playing playlist.
if i add new video to queuing then corrent video that is playing go to end and when next video need to start nothing happend
Have you had crashes doing this kind of thing previously, or has it worked without issues?
I meen crash is maybe strong word, but in past yatse and kodi work, like this: If i send yt video to kodi while video is still playing then that corrent video stop and new begin, and if i queuing video then kodi display message that video is added to queuing and when corrent video go to end new video start.
Funny thing is that kodi no longer display messages about videos is bean send to kodi.
I have backup of my old coreelec sdcard install image that display some youtube error massage when i try to send video to kodi using yatse.
This is why i deleted my old install and started from zero since i thought that my install get corrupted since this install get multiple nightly upgrades over time. + i'm allways running beta and nightly builds of youtube plugin itself
Do you want that i restore old backup and start play yt video and add new video to queuing and then send you new log file?
@Doktor-X - Don't need to do anything with your device. While I didn't expect Yatse to be doing what it is doing, there is nothing technically wrong with what it is doing, and a proper bug fix may not come for a long time (or at all) from Kodi, so in the meantime will see what can be done in this plugin.
If you can install v7.0.7+beta.1 and then just test this:
If i send yt video to kodi while video is still playing then that corrent video stop and new begin, and if i queuing video then kodi display message that video is added to queuing and when corrent video go to end new video start.
If it doesn't work then you can send a new debug log, otherwise just let me know that it is now working OK.
I'll test later tonight and let you know the results and send the log if it doesn't work. The worst thing about this whole story is that I don't know exactly when the problems started, so I can go back to it. Although question is if i even knew when problems started would it be able to start the video when youtube is constantly changing its api
I know when the problem started, because it is caused by a workaround for another bug, but you won't be able to go back to a version without the issue due to Youtube changes.
I am not willing to remove the workaround because without it I experience fairly regular crashes, but if I can't resolve these unintended side effects then will need to make it optional.
See how you go, hopefully it is all sorted now.
woo-hoo, its working, using 7.0.7 beta1 works, now again i can start playing new video when old one is still playing and i can add videos to queue, thanks Mooj for fix, now i dont know is anything broken with this change but at least this problem is fixed or patched
That's good. It was not tested apart from making sure it loads without error, so something is bound to have broken, but if there are no major issues can merge it here and release for wider testing.
At the moment all is working (at least on amlogic s905x3 coreelec), all videos play in 4k, skipping all over video works, age gate videos also works (account login requirement ofc)
At the moment all is working (at least on amlogic s905x3 coreelec), all videos play in 4k, skipping all over video works, age gate videos also works (account login requirement ofc)
Do you use CoreELEC? I'm also on a S905X3 box
Do you use CoreELEC? I'm also on a S905X3 box
Yes nightly build
I have managed to get a debug log if thats still required for this issue.
With 7.0.6 - the queuing works a lot better than older versions but we still have a high rate of misses in one specific scenario: After a fresh reboot, start a Youtube video, and queue another video. In the vast majority of cases this fails to continue to play. When this first video and failure to play has happened, the issue does not reoccur until the box is rebooted.
We see this behaviour on RPi5, RPi3 and x86 Generic versions of LibreELEC12.0.0. The debuglog is for the x86 Generic box. kodi.log
I have managed to get a debug log if thats still required for this issue.
With 7.0.6 - the queuing works a lot better than older versions but we still have a high rate of misses in one specific scenario: After a fresh reboot, start a Youtube video, and queue another video. In the vast majority of cases this fails to continue to play. When this first video and failure to play has happened, the issue does not reoccur until the box is rebooted.
We see this behaviour on RPi5, RPi3 and x86 Generic versions of LibreELEC12.0.0. The debuglog is for the x86 Generic box. kodi.log
Not for me, i have just try reboot my coreelec 21.1 nightly, started video after reboot using yatse and when video started i started new video again and this works
Yeah Queue is is still broken but I stopped mentioning it since I dont have access to pull a log currently. A few Queue issues exist such as it soft crashing and the entire list of Queued videos disappears.
Got another random occurrence of Queuing failing - unfortunately no debug logging enabled at the time, but I did see this in the normal log that could be a pointer. Seemingly it was unable to play a video from the playlist ("unplayable"), twice, and that triggered an issue. It must be noted that both video's were played successfully after the queue stopping.
2024-05-07 18:26:47.578 T:1486 info <general>: COutput::OnExit: Output Thread terminated
2024-05-07 18:26:47.578 T:949 info <general>: VAAPI::Close - closing decoder context
2024-05-07 18:26:47.580 T:949 info <general>: GLES: Selecting YUV 2 RGB shader
2024-05-07 18:26:47.791 T:959 info <general>: CActiveAE::ApplySettings - Forcing samplerate to 48000
2024-05-07 18:26:48.029 T:1124 info <general>: [plugin.video.youtube] Running: YouTube (7.0.6.3) on Omega (Kodi-21.0) with Python 3.11.9
Path: /play/
Params: {'video_id': 'WCW6pxB-KKg'}
2024-05-07 18:26:48.045 T:949 error <general>: Playlist Player: skipping unplayable item: 1, path [plugin://plugin.video.youtube/play/?video_id=WCW6pxB-KKg]
2024-05-07 18:26:48.277 T:1124 warning <general>: [plugin.video.youtube] Multiple busy dialogs active - playlist cleared to avoid Kodi crash
2024-05-07 18:26:48.434 T:1497 info <general>: [plugin.video.youtube] Running: YouTube (7.0.6.3) on Omega (Kodi-21.0) with Python 3.11.9
Path: /play/
Params: {'video_id': 't3swShFvtZg'}
2024-05-07 18:26:48.445 T:949 error <general>: Playlist Player: skipping unplayable item: 2, path [plugin://plugin.video.youtube/play/?video_id=t3swShFvtZg]
2024-05-07 18:26:48.445 T:949 warning <general>: Attempt to set unplayable index 2
2024-05-07 18:26:48.445 T:949 info <general>: CVideoPlayer::CloseFile()
2024-05-07 18:26:48.445 T:949 info <general>: VideoPlayer: waiting for threads to exit
2024-05-07 18:26:48.445 T:949 info <general>: VideoPlayer: finished waiting
2024-05-07 18:26:48.445 T:949 info <general>: CVideoPlayer::CloseFile()
2024-05-07 18:26:48.445 T:949 info <general>: VideoPlayer: waiting for threads to exit
2024-05-07 18:26:48.445 T:949 info <general>: VideoPlayer: finished waiting
2024-05-07 18:26:49.277 T:1124 warning <general>: [plugin.video.youtube] Multiple busy dialogs active - reloading playlist
2024-05-07 18:26:49.286 T:1124 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ValueError'>
Error Contents: invalid literal for int() with base 10: 'None'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/plugin.py", line 17, in <module>
plugin_runner.run(youtube.Provider())
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/plugin_runner.py", line 61, in run
plugin.run(provider, context)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py", line 75, in run
if old_position and position == int(old_position):
^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'None'
-->End of Python script error report<--
2024-05-07 18:26:54.436 T:1497 warning <general>: [plugin.video.youtube] Multiple busy dialogs active - playlist cleared to avoid Kodi crash```
Doktor-X is using a newer beta version that already fixes the known issues with queuing. An updated version of that beta is available here: https://github.com/anxdpanic/plugin.video.youtube/pull/740
@Fludizz, @neo-neo1 - are you still having issues when using this beta version?
Doktor-X is using a newer beta version that already fixes the known issues with queuing. An updated version of that beta is available here: #740
@Fludizz, @neo-neo1 - are you still having issues when using this beta version?
7.0.7 beta 1 doesn't open at all. Can't even open anything — error dialog popup: "YouTube Error" "Check the log for more informationm" Has it been tested for Kodi 21?
And I get Kodi freezing when selecting "Restart Kodi" from Power UI on CoreELEC.
Appreciate your effort
Edit: heres a full debug log, more info than you need so please let me know when I can delete the link.
@MoojMidge thanks
This issue seems to be very tricky! Thanks everyone for your time and work, really appreciated!
Doktor-X is using a newer beta version that already fixes the known issues with queuing. An updated version of that beta is available here: #740
@Fludizz, @neo-neo1 - are you still having issues when using this beta version?
I'll have to try that a bit later, sorry. I wont have access to my kodi boxes in the next few days.
@neo-neo1 - the stuff in my personal repository is almost never tested, it is just a backup and testing repository. When it has been tested, at least a little, I will create a PR on the official repository here where it can get tested further.
The log you sent through is from the old version from my personal repository. It has a number of issues in the non-unofficial zip file, as you have seen for yourself. The newer update is in the PR I linked to in this official repository and fixes those issues, but requires that you pull those changes via git. If you don't know how to do that, then just skip it for now, can download the zip file to test when the PR is merged.
Hadn't merged it yet because the Kodi mirrors were having some issues which was preventing the PR checks from completing.
https://github.com/anxdpanic/plugin.video.youtube/releases/tag/v7.0.7%2Bbeta.1 is available. Can see if there is any improvement to this issue.
Installed it on my kodi boxes and so far, it seems to have fixed it! Have not had any instances where it stopped playing the queue. Thanks @MoojMidge !
Installed it on my kodi boxes and so far, it seems to have fixed it! Have not had any instances where it stopped playing the queue. Thanks @MoojMidge !
Not for me
Context
Please provide any relevant information about your setup
Expected Behavior
Please describe the behavior you are expecting.
Queuing to work
Current Behavior
What is the current behavior? If I launch a single title from my phone, it perfectly works. When adding YouTube titles from my phone to queue, I can see them added in queue in Yatse but when the current title ends it returns to homescreen. If I launch a whole playlist, I have an error message, If I launch a title while already playing one, it stops ans returns to homescreen. I've used queuing for years without any problems but since a few month it regular.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Log
Please include a complete debug log.
hastebin - ewiwadobat.pdf
Additional Information
Please provide any additional information that may be helpful.