gdomenici / plugin.video.pcloud-video-streaming

Plugin for Kodi (Matrix and above) to provide video streaming from pcloud.com
GNU General Public License v3.0
14 stars 3 forks source link

login not possible #18

Closed harryberlin closed 5 years ago

harryberlin commented 5 years ago

can not log in to pcloud and use the addon. system: android log file entry: 18:25:33.251 T:524520780880 ERROR: ERROR: cannot logon to pCloud: Error calling userinfo: Log in failed 18:25:33.285 T:525164774480 ERROR: GetDirectory - Error getting plugin://plugin.video.pcloud-video-streaming/?content_type=video 18:25:33.286 T:525164774480 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.pcloud-video-streaming/?content_type=video) failed

gdomenici commented 5 years ago

Hi @harryberlin ,

That's strange - works for me. Are you able to log on successfully to the pcloud.com website with the same credentials? i.e. email address and password?

harryberlin commented 5 years ago

yes, it is working in webbrowser (pc and smartphone) and app(smartphone). kodi 17.6

gdomenici commented 5 years ago

Hi @harryberlin In that case, then probably something got borked along the way. If you know how to access the Android filesystem, then just delete the directory /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/plugin.video.pcloud-video-streaming. Kodi will recreate it as soon as you start using the plugin again.

If not, I am not sure... maybe removing the plugin and readding it will do the same trick?

Kind regards,

Guido

harryberlin commented 5 years ago

there is no subfolder for pcloud. i reinstalled the addon but no success. there are some special characters in mail adress which can produce problems with the addon?

i'm using my usual gmail adress, but added "+pcloud" before the @. i.e. lalala.hui+pcloud@gmail.com

harryberlin commented 5 years ago

what can i do for better debbuging?

gdomenici commented 5 years ago

Hi @harryberlin

The clue of the "+" in the email address is a good one ... i'm betting that the URL encoding of the PCloud API somehow messes with it. One thing you can do is to try with a throwaway account that doesn't have the "+" and see if that works. If it does, then we know for sure that's the problem. In that case, when I have time (possibly tonight) I'll create a fix. (I also accept pull requests of course, if you know how to fix it yourself).

Kind regards,

Guido

harryberlin commented 5 years ago

i tried to replace the '+' by '%20' in keyboard dialog but same result.

are there some information about response of pcould api? maybe i can try to solve the issue.

gdomenici commented 5 years ago

I'm guessing the snafu happens somewhere around here: https://github.com/gdomenici/plugin.video.pcloud-video-streaming/blob/master/resources/lib/pcloudapi.py#L70 although it manifests itself a few lines later (the raise at line 84).

If im right (havent verified) the way im planning to fix it is by switching from GET to POST -- an example is a few lines later (around here), although you probably dont have this change in your current official Kodi plugin repo version, as it is a very recent fix.

harryberlin commented 5 years ago

there was a ssl verification error in my case (windows) too. check pull request. i'm unsure, if using this workaround is useful.

gdomenici commented 5 years ago

Hi @harryberlin ,

I fixed it in 1.2.11, available on the Releases page. I saw your PR, but preferred not to use it because I found the solution that switches to POST (instead of GET) more resilient to several other "special" characters. So that's what I did. I have tested with an email with a "+" in it, and now it works OK.

Concerning the SSL cert error, no change is necessary in the code... just set the environment variable PYTHONHTTPSVERIFY=0 in Windows "Advanced system settings" dialog, and launch Kodi after that. If now any Python plugin (not just mine) accesses an HTTPS website with a "bad" TLS certificate, the plugin will ignore the error and proceed as though it was a trusted cert.

harryberlin commented 5 years ago

great, it is working :)