Skip to content

TypeError: '<=' not supported between instances of 'NoneType' and 'int' on Android 16 - cookie.py line 51 #1786

Description

@deraul76

Netflix add-on version: 1.23.5+matrix.1
Operating system: Android 16 (API level 36)
Device: OPPO Find X9 Pro (CPH2791)
Kodi version: 21.3 (Omega)
Login method: Authentication key (NFAuthentication.key)

Description:
After successful authentication with NFAuthentication.key and PIN, the addon crashes immediately.

Traceback:
File "services/nfsession/session/cookie.py", line 51, in _verify_session_cookies
if cookie.expires <= int(time.time()):
TypeError: '<=' not supported between instances of 'NoneType' and 'int'

Root cause:
Some cookies in the NFAuthentication.key file have expires = None.
The check on line 51 does not handle this case.

Suggested fix:
Change line 51 from:
if cookie.expires <= int(time.time()):
To:
if cookie.expires is not None and cookie.expires <= int(time.time()):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions