Taapat / enigma2-plugin-youtube

YouTube enigma2 plugin to manage your youtube account and wach videos
GNU General Public License v2.0
34 stars 38 forks source link

Interesting Problems #170

Closed thawtes closed 2 years ago

thawtes commented 2 years ago

openATV 7.1 E2 system language set to English = YT Login Work E2 system language is set to another language other than English = YT Login Not Work (If E2 system language is not English but any other language is set)

openATV 6.4 + 7.0 + 7.1 E2 system language is set to another language other than English (If E2 system language is not English but any other language is set) 1) Youtube Setup > YouTube.player = ConfigSelection (default, exteplayer, gstplayer) not show in YT Setup Menu 2) Public Feeds > Movies Feed list only showing first 24, not showing after 24..

thanks

Taapat commented 2 years ago

I can't confirm the language issue. Maybe please specify which languages have a problem so I can try. I have no problem on openATV 7.1 with login using my Latvian system language.

Also when I install the plugin serviceapp from the feed player choise is displayed in the settings menu.

I can confirm that the amount of movies is limited in public feeds. This may be due to restrictions in movie content distribution in some languages.

thawtes commented 2 years ago

thanks dear @Taapat install latest release (1,011 commits)

openATV 6.x + 7.x Youtube Setup > Media Player this menu setting, now it display - FIXED

Public Feeds > Movies Feed As far as I can test, if search region USA, FR and UK are selected, 24 and later are listed. I tried many of the other countries but it is not listed (e.g Turkey, Latvia) now after what you wrote, I'm not sure if this is a problem.

openATV 7.1 YT Login Problem : I will test and let you know for this issue..

thanks...

thawtes commented 2 years ago

hi again @Taapat

openATV 7.1 - YT Login problem still persists

E2 system language set to English = YT Login Work E2 system language is set to another language other than English = YT Login Not Work

I looked in the debug log

E2 language set to English : No Problem

E2 language set to Turkish (yt login not work)

04:32:15.2249 [OAuth] Error in auth response <urlopen error [SSL: UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS] unable to find public key parameters (_ssl.c:997)>

04:32:15.2273 [OAuth] Error in get access token

that's the only difference in the debug log, I hope that will be useful

Now I don't think the problem is with this plugin i think the problem is caused by libraries in Python 3.10.2 or SSL used in OpenATV 7.1

thx

Taapat commented 2 years ago

Do I understand correctly how to test this problem? The system language is English. You have an authorized plugin and it works. You change the system language to Turkish, open the plugin and it opens without authorization without your personal feeds?

thawtes commented 2 years ago

Do I understand correctly how to test this problem? The system language is English. You have an authorized plugin and it works. You change the system language to Turkish, open the plugin and it opens without authorization without your personal feeds?

Yes, you got it right !

in addition, other functions of the plugin do not work (e.g video extract public feeds..)

Taapat commented 2 years ago

I can confirm that there is a problem in Turkish language. I did not observe such a problem in any other language witch I tried (Latvian, English, Russian, French). Also in Turkish on openpli develop such a problem does not exist. I assume there may be a specific system encoding problem. Don't you have a problem with some other plugins that use https connections?

thawtes commented 2 years ago

I can confirm that there is a problem in Turkish language. I did not observe such a problem in any other language witch I tried (Latvian, English, Russian, French). Also in Turkish on openpli develop such a problem does not exist. I assume there may be a specific system encoding problem. Don't you have a problem with some other plugins that use https connections?

I don't use many plugins. I only use youtube, bluray player and subssupport plugins. So I can't say anything.

Like you, I think the problem is with the system, but I have no idea how to technically report it to the developers.

Thank you for your interest and help.

Taapat commented 2 years ago

@thawtes I found problems with LC_CTYPE in Turkish language. When replacing a file LC_CTYPE in a directory /usr/lib/locale/tr_TR with the same from another language, such as C.UTF-8, the login works. Also the size of the LC_CTYPE file in Turkish is much smaller than elsewhere. I assume that the locale package does not contain the correct file, but I may be wrong. You can search in this direction.

thawtes commented 2 years ago

my dear friend Taapat, thank you very much. I hope this is exactly the problem. I will try it as soon as possible and let you know.

Thanks again for everything...

thawtes commented 2 years ago

dear @Taapat its works, thank you very much !

Taapat commented 2 years ago

This is just a workaround. In fact, you should find out what causing the problem. Invalid file or python environ settings.

thawtes commented 2 years ago

This is just a workaround. In fact, you should find out what causing the problem. Invalid file or python environ settings.

yes i can guess, i opened the topic on openATV forum and waiting for developers to check it out. thank you for everything...

Taapat commented 2 years ago

You can try the latest version of the plugin after these changes: https://github.com/Taapat/enigma2-plugin-youtube/commit/872c501c5eaa030276caa929f1ea2e0a9ed743eb In fact, this needs to be fixed in the image. And this is a workaround that should not be used in plugins. I can guess that the Turkish LC_CTYPE does not contain any characters that are used in the key files and therefore causes an ssl error. Therefore, it may not be correct to use the language-specific LC_CTYPE in python. But those are just my guesses.

thawtes commented 2 years ago

I totally agree with you, unfortunately many other places using https connection have the same problem and it needs to be fixed on the Image side as you said, thanks again for your help...

nautilus7 commented 2 years ago

@Taapat if the Turkish LC_CTYPE definitions are wrong/corrupted in openATV, then they should fix it.

You cannot mess with system locale settings in your plugin as this causes problems in other code (enigma2 core code or plugins and skins) that depend on having a UTF8 locale to play with.

For example, in our SatDreamGr image, we use a skin which provides some weather info. These info need a UTF8 locale setting in order to be parsed. As soon the user opens the youtube plugin, the locale is set to (None, None) which causes any non ascii character reading for the time youtube is active (e.g. reading a file containing Greeks) to result in a green screen!!!

This is a huge problem! You cannot keep the current solution, as it breaks more than it fixes!

nautilus7 commented 2 years ago

@Taapat any news regarding this problem?

Taapat commented 2 years ago

As there is no objection on your comment I remove ssl key error workaround.

nautilus7 commented 2 years ago

Thanks.

Btw, it doesn't seem an openatv problem. It looks like a glibc locale bug.

The LC_CTYPE locale definition for tr_TR is totally different than any other locale I have seen. Have a look at https://lh.2xlibre.net/locale/tr_TR/

A goggle search also reveals more related problems in other systems and applications.

I believe this is something that should be reported to the glibc team.

Taapat commented 2 years ago

I'm not saying it's an openatv problem. I see that this is a problem using LC_CTYPE in python. I understand that LC_CTYPE must contain local characters and their order. And I assume that it doesn't have to contain characters in other languages that may be used in the image. Therefore, I don't know if it is correct to use it in python at all, or in pytnon something is missing to use it correctly. But maybe it's really a glibc locale bug.