Coder Social home page Coder Social logo

Comments (8)

 avatar commented on August 12, 2024

Hi, look at the line 1049 of your log file.

from plugin.video.netflix.

lekma avatar lekma commented on August 12, 2024

possible quick and dirty fix (untested):

--- msl_handler.py.old	2019-03-11 20:51:11.000000000 +0100
+++ msl_handler.py	2019-03-13 12:53:15.386631322 +0100
@@ -290,7 +290,7 @@
         raise MSLError(_get_error_details(decoded_response))
     if isinstance(decoded_response, list):
         if decoded_response[0].get('error'):
-            raise MSLError(_get_error_details(decoded_response))
+            raise MSLError(_get_error_details(decoded_response[0]))
     return decoded_response
 
 
@@ -303,9 +303,8 @@
         return decoded_response['result']['errorDisplayMessage']
     elif decoded_response.get('result', {}).get('errorDetails'):
         return decoded_response['result']['errorDetails']
-    elif isinstance(decoded_response, list):
-        if decoded_response[0].get('error', {}).get('errorDisplayMessage'):
-            return decoded_response[0]['error']['errorDisplayMessage']
+    elif decoded_response.get('error', {}).get('errorDisplayMessage'):
+        return decoded_response['error']['errorDisplayMessage']
     return ''
 
 

@CastagnaIT: am I correct to assume _get_error_details() is a remnant of the past? If yes, may I suggest the following (also untested):

--- msl_handler.py.old	2019-03-11 20:51:11.000000000 +0100
+++ msl_handler.py	2019-03-13 14:12:21.205012552 +0100
@@ -287,26 +287,19 @@
     if 'errordata' in decoded_response:
         common.error('Full MSL error information:')
         common.error(json.dumps(decoded_response))
-        raise MSLError(_get_error_details(decoded_response))
-    if isinstance(decoded_response, list):
-        if decoded_response[0].get('error'):
-            raise MSLError(_get_error_details(decoded_response))
+        raise MSLError(_decode_errordata(decoded_response['errordata']))
+    if isinstance(decoded_response, list) and ('error' in decoded_response[0]):
+        error = decoded_response[0]['error']
+        try:
+            message = error.get('errorDisplayMessage', '')
+        except AttributeError:
+            message = str(error)
+        raise MSLError(message)
     return decoded_response
 
 
-def _get_error_details(decoded_response):
-    if 'errordata' in decoded_response:
-        return json.loads(
-            base64.standard_b64decode(
-                decoded_response['errordata']))['errormsg']
-    elif decoded_response.get('result', {}).get('errorDisplayMessage'):
-        return decoded_response['result']['errorDisplayMessage']
-    elif decoded_response.get('result', {}).get('errorDetails'):
-        return decoded_response['result']['errorDetails']
-    elif isinstance(decoded_response, list):
-        if decoded_response[0].get('error', {}).get('errorDisplayMessage'):
-            return decoded_response[0]['error']['errorDisplayMessage']
-    return ''
+def _decode_errordata(errordata):
+    return json.loads(base64.standard_b64decode(errordata))['errormsg']
 
 
 @common.time_execution(immediate=True)

edit: it may be worth checking that decoded_response[0] is in fact a dict before checking for the presence of 'error' (unless the api garantees it).

from plugin.video.netflix.

SeyedMahmoudian avatar SeyedMahmoudian commented on August 12, 2024

Hi, look at the line 1049 of your log file.

I checked and can login with my chrome it

from plugin.video.netflix.

SeyedMahmoudian avatar SeyedMahmoudian commented on August 12, 2024

I did not change anything but the new issue is when I click to play a video the Kodi crashed and closed
kodi log: https://pastebin.com/uQw0hRva
memory dump : https://pastebin.com/pzvsh39K

from plugin.video.netflix.

CastagnaIT avatar CastagnaIT commented on August 12, 2024

I will recheck the error handling to handle this exception as well,
but your real problem is:

"Your Netflix account is in use on too many devices. Please stop playing on other devices to continue."

from plugin.video.netflix.

SeyedMahmoudian avatar SeyedMahmoudian commented on August 12, 2024

I will recheck the error handling to handle this exception as well,
but your real problem is:

"Your Netflix account is in use on too many devices. Please stop playing on other devices to continue."

so I was looking around and this is what I found out I am running Kodi on windows but for some reason, Kodi IP address is different from my computer address, for example, my computer IP is 192.168.0.1 but in Kodi, it says 172.30.175.225, it seems to be a virtual address that is why I can not add my netflix account

from plugin.video.netflix.

CastagnaIT avatar CastagnaIT commented on August 12, 2024

yes that's another thing, the wrong ip it's a kodi bug that has been handed down for many months and have never solved... just activate Windows 10 Miracast wireless display and kodi goes crazy...

from plugin.video.netflix.

SeyedMahmoudian avatar SeyedMahmoudian commented on August 12, 2024

Alright then this seems to be kodi fault not the addons so no need to keep the issue open as nothing can be done

from plugin.video.netflix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.