Skip to content

Login with NFAuthentication.key fails with HTTP 404 on deprecated /api/shakti/mre/profilehub endpoint #1806

Open

Description

@blesly-hun

Netflix add-on version

1.23.5+matrix.1

Operative systems used

CoreELEC

Kodi version used

Other (specify in description)

Description of the bug

On Kodi 21.3 (Omega) / CoreELEC 21.3, when logging in using an NFAuthentication.key file (plus PIN and account password), login_auth_data() in resources/lib/services/nfsession/session/access.py (lines 130–144) attempts to verify the account password by sending a POST request to the profile_hub endpoint (https://www.netflix.com/api/shakti/mre/profilehub).

Netflix has deprecated/removed /api/shakti/mre/profilehub, so the server now responds with 404 Client Error: Not Found for url: https://www.netflix.com/api/shakti/mre/profilehub. Because the except exceptions.HTTPError as exc: block only catches HTTP 500 and re-raises all other HTTP status codes, the login crashes right before saving the credentials and cookies.

Additionally, in resources/lib/services/playback/am_video_events.py, _send_event() can raise an unhandled KeyError on playback start/stop if player/stream state data is not yet fully populated in event_data, which triggers an add-on error popup during playback initialization.

Steps to reproduce the behavior

  1. Select login with Authentication key (NFAuthentication.key).
  2. Enter the PIN and the Netflix account password.
  3. login_auth_data() calls self.post_safe("profile_hub", ...).
  4. Netflix returns HTTP 404 Not Found for https://www.netflix.com/api/shakti/mre/profilehub and login aborts with an unhandled HTTPError.

Debug log - mandatory

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.netflix.com/api/shakti/mre/profilehub (in resources/lib/services/nfsession/session/access.py line 143)

Possible fix

  1. In resources/lib/services/nfsession/session/access.py (login_auth_data), handle HTTP 404 (or non-500 HTTPError) gracefully with a warning so that login can proceed and save the valid session cookies from NFAuthentication.key:
--- a/resources/lib/services/nfsession/session/access.py
+++ b/resources/lib/services/nfsession/session/access.py
@@ -140,7 +140,9 @@ class SessionAccess(SessionHTTPRequest):
             if exc.response.status_code == 500:
                 # This endpoint raise HTTP error 500 when the password is wrong
                 raise LoginError(common.get_local_string(12344)) from exc
-            raise
+            LOG.warn(f"Parental control profile_hub endpoint unavailable ({exc}). Skipping verification.")
+        except Exception as exc:
+            LOG.warn(f"Parental control profile_hub check skipped: {exc}")
         common.set_credentials({"email": email, "password": password})
  1. In resources/lib/services/playback/am_video_events.py, wrap _send_event() event building/dispatch in try ... except KeyError so missing telemetry keys do not interrupt playback.

Additional context

No response

Screenshots

No response

Activity

  1. added
    BugSomething isn't working
    Triage: NeededIssue that was just created and needs someone looking at it
    on Sep 30, 2026
  2. shithead commented on Oct 8, 2026

    @shithead

    This was generated by AI during triage.

    This 404 fits a migration pattern documented in #1807: the Shakti profile
    endpoints we could capture (/api/shakti/mre/profiles/switch, /profileLock)
    are also gone — one more reason the #1796 rollback to /SwitchProfile should be
    re-checked before it is relied on.

    #1807 lists the GraphQL useProfilesSummaryQuery as a candidate, but unlike the
    artwork work it is not proven end-to-end — direction and evidence, not a
    ready fix for the login flow yet.

  3. ccoenen commented on Oct 31, 2026

    @ccoenen

    I can confirm that the change by @blesly-hun got me past that error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriage: NeededIssue that was just created and needs someone looking at it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions