Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Wizard does not always open (languageinvokerthread appears to hang) #920

Open
scrampker opened this issue Oct 2, 2024 · 18 comments
Open
Labels
bug Something isn't working

Comments

@scrampker
Copy link

Context

Please provide any relevant information about your setup

  • Add-on Version: 7.1.0 (pulled from thread The OAuth client was not found #910)
  • Kodi Version: 21.1
  • Kodi GUI Language: English
  • Operating System: OSMC Vero V (Debian 11.11) Open Source Media Center 2024.08-1 (kernel: Linux 4.9.269-69-osmc)
  • Operating System Language: English

Expected Behavior

Expecting the oauth error to be fixed, and app to start properly. Previously the app would give oauth error.


Current Behavior

The app refuses to run, with generic error, but no oauth mention.


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Install repo version 7.0.9.2 and dependencies.
  2. Install 7.1.0 version from linked thread above by copying zip over SMB share and using addon browser to install.
  3. Confirm new version of app.
  4. Run -- get error.

Log

Please include a complete debug log.


Additional Information

Can you retest https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip

I think it should be fixed but no opportunity to test it myself.

2024-10-02 18:58:04.867 T:2957 info <general>: CActiveAESink::OpenSink - initialize sink 2024-10-02 18:58:04.868 T:2957 info <general>: CAESinkALSA::Initialize - Requested layout FL, FR, FC, LFE, BL, BR, SL, SR 2024-10-02 18:58:04.868 T:2957 info <general>: CAESinkALSA::Initialize - set digital codec 0 2024-10-02 18:58:04.868 T:2957 info <general>: CAESinkALSA::Initialize - Attempting to open device "default" 2024-10-02 18:58:04.890 T:2957 info <general>: CAESinkALSA::Initialize - Opened device "default" 2024-10-02 18:58:04.891 T:2957 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats 2024-10-02 18:58:04.891 T:2957 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4 2024-10-02 18:58:04.931 T:2957 info <general>: CAESinkALSA::Initialize - speaker layout 19 2024-10-02 18:58:16.999 T:6109 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'IndentationError'> Error Contents: unexpected indent (youtube.py, line 59) Traceback (most recent call last): File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/script.py", line 14, in <module> from youtube_plugin.kodion import script_actions File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/script_actions.py", line 25, in <module> from ..youtube import Provider File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/__init__.py", line 13, in <module> from .provider import Provider File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/provider.py", line 19, in <module> from .client import APICheck, YouTube File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/__init__.py", line 14, in <module> from .youtube import YouTube File "/home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 59 'tv': { IndentationError: unexpected indent -->End of Python script error report<--

This looks a lot like when a required dependency is not installed, or a bad call/syntax is used. Any thoughts? It's been a real eye-opener buying this device and trying to get things to work, despite using XMBC back in the day on my modded XB. So far I'm 0 for 2 on Plex and YouTube using the 'official' add-ons to make this OSMC box compete even slightly with my Shield Pro.

@scrampker scrampker added the bug Something isn't working label Oct 2, 2024
@scrampker

This comment was marked as off-topic.

@MoojMidge

This comment was marked as off-topic.

@scrampker

This comment was marked as off-topic.

@MoojMidge

This comment was marked as off-topic.

@scrampker

This comment was marked as off-topic.

@MoojMidge

This comment was marked as off-topic.

@scrampker
Copy link
Author

Okay I'll see what I can dig up. In the meantime something is driving me nuts. Almost every time I click the plugin from programs, or favourites, it opens straight into settings. No amount of searching here or in general has helped. I have to use the menu button -> Information -> scroll to open. Not fun because that locks me into using the dinky little remote instead of CEC. Ever seen something like that before?

@MoojMidge
Copy link
Collaborator

Almost every time I click the plugin from programs, or favourites, it opens straight into settings.

Kodi addons have various extension points that they can use. This particular addon has several, including a program extension point that by default will open the addon settings.

If you want to open the plugin extension point, which has all the actual plugin content, then you should open the plugin from the Video Addons node in the Kodi library, not from the Program addons node.

@dtteufel
Copy link

dtteufel commented Oct 6, 2024

7.1.0 seems to run fine for me on OSMC Vero 5 - providing I DO NOT run the setup option.
I'll try to get a log for you.

@scrampker
Copy link
Author

7.1.0 seems to run fine for me on OSMC Vero 5 - providing I DO NOT run the setup option. I'll try to get a log for you.

Yep, it definitely runs on my Vero 5. The only issues I have is that about 30% of videos have audio skip out every 2-3 seconds. 100% of videos skip audio/video about 2 seconds in, but it's not recurring. I also have a few issues if I let it run through the guided setup as well. Crashes out and I can resume some of it.

I assume there's some codec that needs to be disabled to maintain full compatibility re: audio dropouts. Though from what I can find online, the Vero V should support them all.

@MoojMidge
Copy link
Collaborator

I also have a few issues if I let it run through the guided setup as well. Crashes out and I can resume some of it.

providing I DO NOT run the setup option.

Sounds like the same issue, but I can't do anything without a log.

Trying to get a v7.1.0.1 release pushed to the official Kodi addon repository shortly, so if either of you can get a log of this then I can try to get a fix for this included as well.

The only issues I have is that about 30% of videos have audio skip out every 2-3 seconds

This shouldn't happen, but again will need a debug log.

100% of videos skip audio/video about 2 seconds in, but it's not recurring.

This is likely just Kodi selecting the correct framerate because the framerate identified by YouTube is incorrect.

Won't be able to get rid of this, but you can try changing the following settings to see if it minimises the occurrence for the types of videos you play:

  • YouTube plugin > Settings > General > Stream features > Disable fractional framerate hinting
  • YouTube plugin > Settings > General > Stream features > Disable all framerate hinting

Though from what I can find online, the Vero V should support them all.

It should play pretty much everything on Youtube smoothly.

@dtteufel

This comment was marked as off-topic.

@MoojMidge

This comment was marked as off-topic.

@scrampker
Copy link
Author

I updated the refresh rate settings, and it's probably too soon to tell, but the early-on skip for A/V seems to be gone or at least way better. Also, of course just my luck, I'm not finding any videos that continuously skip. It's a bit hard to jump back through my history to find the clips. In fact, my history only has a single video in it for some reason.

As I'm writing this, I finally found a video that has this issue. Seems to happen to many from this creator. 4K VP9 content. Attaching the debug log.

  • It has a 3 second black out of video and audio in the first 5-10 seconds, then it has audio dropouts every 3 seconds continuously. - Then, after trying to play that last video for a bit, I went ahead and enabled the setup wizard and clicked ok. I immediately get the pop-up.
  • The very first question "Configure settings?" I click yes, and it just falls back to the videos page, (not even inside the video addons folder)
  • Start plugin again, and it's normal. The setup wizard is disabled. Re-enable, click OK.
  • Configure question again, this time yes goes to question 2. Recommended values. I clicked no through all the rest.

Last but not least, I tried the API configuration page again.

  • Hit the webpage again, without changing any settings. (meaning the specific IP is still configured as the target.. not 0.0.0.0 default.)
  • Went back into advanced settings, and chose the listen IP from the menu as 0.0.0.0. Which btw has a bug where I drop out of the settings menu. If I do this from within the plugin by using the side-bar, it drops back to the side-bar, and if I did this in the past using the Programs entry point, it falls out completely back to the Programs selection menu.
  • Back into the Advanced settings to double check -- yep it's set to 0.0.0.0. Hitting OK to save/exit settings properly.
  • Check in my browser at http://192.168.187.8:50152/youtube/api again and no dice. Page not found. I see no errors on the debug log in realtime while I hit refresh. "2024-10-07 14:08:01.628 T:20189 debug : Thread JobWorker 3539988736 terminating (autodelete)" is the closest thing, but it's not actually directly-responsive to me hitting refresh. Probably a coincidence, but it did occur after changing to 0.0.0.0.

kodi.log

@MoojMidge
Copy link
Collaborator

It's a bit hard to jump back through my history to find the clips. In fact, my history only has a single video in it for some reason.

This is likely due to a bug in v7.0.9.2 that was fixed in v7.1.0

  • It has a 3 second black out of video and audio in the first 5-10 seconds, then it has audio dropouts every 3 seconds continuously.

There is a lot going on in your log. Your settings appear to indicate that you have an 8 channel speaker setup. Is this actually the case?

Can you get a debug log where you are only playing the video that skips continuously?

  • The very first question "Configure settings?" I click yes, and it just falls back to the videos page, (not even inside the video addons folder)

Does this happen regularly? Or just on this occasion? Is this what you mean by the Setup Wizard crashing?

  • Went back into advanced settings, and chose the listen IP from the menu as 0.0.0.0. Which btw has a bug where I drop out of the settings menu. If I do this from within the plugin by using the side-bar, it drops back to the side-bar, and if I did this in the past using the Programs entry point, it falls out completely back to the Programs selection menu.

That is not a bug. The listen IP selection is a separate dialog. The settings dialog needs to be closed otherwise it won't get updated with the new selection.

  • Check in my browser at http://192.168.187.8:50152/youtube/api again and no dice. Page not found. I see no errors on the debug log in realtime while I hit refresh. "2024-10-07 14:08:01.628 T:20189 debug : Thread JobWorker 3539988736 terminating (autodelete)" is the closest thing, but it's not actually directly-responsive to me hitting refresh. Probably a coincidence, but it did occur after changing to 0.0.0.0.

Maybe this needs to be made clearer, but listening on 0.0.0.0 is actually serving on 127.0.0.1. Had to do this because of some previously reported issues with network interfaces on some systems not being available to bind to. Not sure if it is still a problem.

@scrampker
Copy link
Author

scrampker commented Oct 8, 2024

It's a bit hard to jump back through my history to find the clips. In fact, my history only has a single video in it for some reason.

This is likely due to a bug in v7.0.9.2 that was fixed in v7.1.0

Makes sense.

  • It has a 3 second black out of video and audio in the first 5-10 seconds, then it has audio dropouts every 3 seconds continuously.

There is a lot going on in your log. Your settings appear to indicate that you have an 8 channel speaker setup. Is this actually the case?

It's actually a 5.1.2 (Dolby Atmos w/ 2 up-firing,) setup, which is confusing how to actually configure in the settings. It's pretty happy up or down-mixing, however.

Can you get a debug log where you are only playing the video that skips continuously?

  • The very first question "Configure settings?" I click yes, and it just falls back to the videos page, (not even inside the video addons folder)

Does this happen regularly? Or just on this occasion? Is this what you mean by the Setup Wizard crashing?

I mean that as soon as I clicked 'yes' the screen refreshes and I'm no longer in the settings menu at all. It's as though it has submitted my yes/no selection, then fallen out. This does not appear to happen every single time, no.

  • Went back into advanced settings, and chose the listen IP from the menu as 0.0.0.0. Which btw has a bug where I drop out of the settings menu. If I do this from within the plugin by using the side-bar, it drops back to the side-bar, and if I did this in the past using the Programs entry point, it falls out completely back to the Programs selection menu.

That is not a bug. The listen IP selection is a separate dialog. The settings dialog needs to be closed otherwise it won't get updated with the new selection.

Gotcha. A bit unexpected, but it is what it is I suppose.

  • Check in my browser at http://192.168.187.8:50152/youtube/api again and no dice. Page not found. I see no errors on the debug log in realtime while I hit refresh. "2024-10-07 14:08:01.628 T:20189 debug : Thread JobWorker 3539988736 terminating (autodelete)" is the closest thing, but it's not actually directly-responsive to me hitting refresh. Probably a coincidence, but it did occur after changing to 0.0.0.0.

Maybe this needs to be made clearer, but listening on 0.0.0.0 is actually serving on 127.0.0.1. Had to do this because of some previously reported issues with network interfaces on some systems not being available to bind to. Not sure if it is still a problem.

Perhaps the default setting should be to bind to the actual v4 address then? Just shooting from the hip.

I've attached a new log with just the attempt to play the video that skips audio.

kodi.log

@scrampker
Copy link
Author

FYI, just tried switching my Vero 5 to 5.1 and the audio still skips.

@MoojMidge
Copy link
Collaborator

This issue is a bit all over the place.

I have split things up into separate issues to keep track of things.

Lets keep this issue specific to the Setup Wizard not opening.

I mean that as soon as I clicked 'yes' the screen refreshes and I'm no longer in the settings menu at all. It's as though it has submitted my yes/no selection, then fallen out. This does not appear to happen every single time, no.

It's strange, the Python interpreter appears to be unable to finish running because there is a confirmation dialog open, but is being asked to terminate so that the language invoker thread can be reused, presumably to run the Setup Wizard.

Can't think of what would cause this. Does your system feel slow or otherwise unresponsive to user input by any chance?

Can you see this still happens in v7.1.0 or v7.1.0.1?

@MoojMidge MoojMidge reopened this Oct 8, 2024
@MoojMidge MoojMidge changed the title YT plugin (7.1.0) will not work on OSMC Vero V Setup Wizard does not always open (languageinvokerthread appears to hang) Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants