[GH-ISSUE #1] Error checking status once user is active #1

Closed
opened 2026-02-27 20:08:59 +03:00 by kerem · 11 comments
Owner

Originally created by @tomballgithub on GitHub (Jan 19, 2026).
Original GitHub issue: https://github.com/misiektoja/xbox_monitor/issues/1

I just started using this tool, and am seeing 3 types of things occur during checking presence, 2 good, 1 bad.

I added some debug code to help narrow this down.

  1. Offline example
debug: checking presence
- presence checked
{
    "xuid": "XXX",
    "state": "Offline",
    "last_seen": {
        "device_type": "Scarlett",
        "title_id": "1870487792",
        "title_name": "NBA 2K26",
        "timestamp": "2026-01-19T05:03:43.1085775"
    },
    "devices": null
}
- checking class
- class checked
-- status:        offline
-- title_name:    NBA 2K26
-- game_name:     
-- platform:      XSX
-- lastonline_ts: 1768799023
  1. Online (platform = ios), no errors while online
debug: checking presence
- presence checked
{
    "xuid": "2535468411947698",
    "state": "Online",
    "last_seen": null,
    "devices": [
        {
            "titles": [
                {
                    "id": "328178078",
                    "name": "Xbox App",
                    "activity": null,
                    "lastModified": "2026-01-19T15:11:59.1358732",
                    "placement": "Full",
                    "state": "Active"
                }
            ],
            "type": "iOS"
        }
    ]
}
- checking class
- class checked
-- status:        online
-- title_name:    
-- game_name:     
-- platform:      iPhone/iPad
-- lastonline_ts: 0
  1. ERRORs entire time user is online (platform = unknown).
    Errors stop once user goes offline, so doesn't seem to be the auth key
    Its a pydantic error
debug: checking presence
* Error getting presence, retrying in 1 minute, 30 seconds: 1 validation error for PresenceItem
devices.0.titles.1.activity
  Input should be a valid list [type=list_type, input_value={'richPresence': 'The City'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/list_type
* Xbox auth key might not be valid anymore!

The debug code is as follows, so the error is occurring on this command:
presence = await xbl_client.presence.get_presence(str(xuid), PresenceLevel.ALL)

        # Main loop
        while True:
            try:
                print("debug: checking presence")
                presence = await xbl_client.presence.get_presence(str(xuid), PresenceLevel.ALL)
                print("- presence checked")
                full_data = presence.model_dump()
                print(json.dumps(full_data, indent=4))
                print("- checking class")
                status, title_name, game_name, platform, lastonline_ts = xbox_process_presence_class(presence)
                print("- class checked")
                print(f"-- status:        {status}")
                print(f"-- title_name:    {title_name}")
                print(f"-- game_name:     {game_name}")
                print(f"-- platform:      {platform}")
                print(f"-- lastonline_ts: {lastonline_ts}")
                print_cur_ts("\nTimestamp:\t\t\t")

Here are the different 'Input should be a valid list' errors I've seen. 'The Theater' is by far the most prevalent.
None of these are games that the user plays.

  Input should be a valid list [type=list_type, input_value={'richPresence': 'The City'}, input_type=dict]
  Input should be a valid list [type=list_type, input_value={'richPresence': 'The City: The REC'}, input_type=dict]
  Input should be a valid list [type=list_type, input_value={'richPresence': 'The City: The Theater'}, input_type=dict]
  Input should be a valid list [type=list_type, input_value={'richPresence': 'The Theater: 0P 0R 0A'}, input_type=dict]
Originally created by @tomballgithub on GitHub (Jan 19, 2026). Original GitHub issue: https://github.com/misiektoja/xbox_monitor/issues/1 I just started using this tool, and am seeing 3 types of things occur during checking presence, 2 good, 1 bad. I added some debug code to help narrow this down. 1. Offline example ``` debug: checking presence - presence checked { "xuid": "XXX", "state": "Offline", "last_seen": { "device_type": "Scarlett", "title_id": "1870487792", "title_name": "NBA 2K26", "timestamp": "2026-01-19T05:03:43.1085775" }, "devices": null } - checking class - class checked -- status: offline -- title_name: NBA 2K26 -- game_name: -- platform: XSX -- lastonline_ts: 1768799023 ``` 2. Online (platform = ios), no errors while online ``` debug: checking presence - presence checked { "xuid": "2535468411947698", "state": "Online", "last_seen": null, "devices": [ { "titles": [ { "id": "328178078", "name": "Xbox App", "activity": null, "lastModified": "2026-01-19T15:11:59.1358732", "placement": "Full", "state": "Active" } ], "type": "iOS" } ] } - checking class - class checked -- status: online -- title_name: -- game_name: -- platform: iPhone/iPad -- lastonline_ts: 0 ``` 3. ERRORs entire time user is online (platform = unknown). Errors stop once user goes offline, so doesn't seem to be the auth key Its a pydantic error ``` debug: checking presence * Error getting presence, retrying in 1 minute, 30 seconds: 1 validation error for PresenceItem devices.0.titles.1.activity Input should be a valid list [type=list_type, input_value={'richPresence': 'The City'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.11/v/list_type * Xbox auth key might not be valid anymore! ``` The debug code is as follows, so the error is occurring on this command: presence = await xbl_client.presence.get_presence(str(xuid), PresenceLevel.ALL) ``` # Main loop while True: try: print("debug: checking presence") presence = await xbl_client.presence.get_presence(str(xuid), PresenceLevel.ALL) print("- presence checked") full_data = presence.model_dump() print(json.dumps(full_data, indent=4)) print("- checking class") status, title_name, game_name, platform, lastonline_ts = xbox_process_presence_class(presence) print("- class checked") print(f"-- status: {status}") print(f"-- title_name: {title_name}") print(f"-- game_name: {game_name}") print(f"-- platform: {platform}") print(f"-- lastonline_ts: {lastonline_ts}") print_cur_ts("\nTimestamp:\t\t\t") ``` Here are the different 'Input should be a valid list' errors I've seen. 'The Theater' is by far the most prevalent. None of these are games that the user plays. ``` Input should be a valid list [type=list_type, input_value={'richPresence': 'The City'}, input_type=dict] Input should be a valid list [type=list_type, input_value={'richPresence': 'The City: The REC'}, input_type=dict] Input should be a valid list [type=list_type, input_value={'richPresence': 'The City: The Theater'}, input_type=dict] Input should be a valid list [type=list_type, input_value={'richPresence': 'The Theater: 0P 0R 0A'}, input_type=dict] ```
kerem closed this issue 2026-02-27 20:09:00 +03:00
Author
Owner

@tomballgithub commented on GitHub (Jan 20, 2026):

I have determined that the error is occurring within xbox-webapi, which hasn't been updated in 8 months

I am trying 2 debug steps:

<!-- gh-comment-id:3770585100 --> @tomballgithub commented on GitHub (Jan 20, 2026): I have determined that the error is occurring within `xbox-webapi`, which hasn't been updated in 8 months I am trying 2 debug steps: - I've added debug code within the API to narrow down the issue - I am trying this fork that seems to be updated: https://github.com/tr4nt0r/python-xbox
Author
Owner

@tomballgithub commented on GitHub (Jan 21, 2026):

I opened an issue on the fork above, because the xbox-webapi code hasn't been touched in 8 months. It may not be actively maintained. I put a ton of detail in there. I've narrowed down what is causing it.

https://github.com/tr4nt0r/python-xbox/issues/85

<!-- gh-comment-id:3776082379 --> @tomballgithub commented on GitHub (Jan 21, 2026): I opened an issue on the fork above, because the xbox-webapi code hasn't been touched in 8 months. It may not be actively maintained. I put a ton of detail in there. I've narrowed down what is causing it. https://github.com/tr4nt0r/python-xbox/issues/85
Author
Owner

@tomballgithub commented on GitHub (Jan 21, 2026):

I've documented the fix at that link.

<!-- gh-comment-id:3776124636 --> @tomballgithub commented on GitHub (Jan 21, 2026): I've documented the fix at that link.
Author
Owner

@tomballgithub commented on GitHub (Jan 23, 2026):

This repository is actively maintained and has integrated the fix.
https://github.com/tr4nt0r/python-xbox

There are some notes in the issue from the maintainer about the maintenance status of the other repository.
https://github.com/tr4nt0r/python-xbox/issues/85

<!-- gh-comment-id:3787660261 --> @tomballgithub commented on GitHub (Jan 23, 2026): This repository is actively maintained and has integrated the fix. https://github.com/tr4nt0r/python-xbox There are some notes in the issue from the maintainer about the maintenance status of the other repository. https://github.com/tr4nt0r/python-xbox/issues/85
Author
Owner

@misiektoja commented on GitHub (Jan 23, 2026):

Thanks. It seems I will have to rewrite the tool to use this new library. It is a fork so it should not require a big effort.

BTW, maybe just switching the pip module and imports will help ? Have you tried ?

<!-- gh-comment-id:3787703592 --> @misiektoja commented on GitHub (Jan 23, 2026): Thanks. It seems I will have to rewrite the tool to use this new library. It is a fork so it should not require a big effort. BTW, maybe just switching the pip module and imports will help ? Have you tried ?
Author
Owner

@tomballgithub commented on GitHub (Jan 23, 2026):

Yes, that's all I did and it worked immediately.

<!-- gh-comment-id:3787744736 --> @tomballgithub commented on GitHub (Jan 23, 2026): Yes, that's all I did and it worked immediately.
Author
Owner

@tomballgithub commented on GitHub (Jan 23, 2026):

I find it odd that no one else reported this unless people aren't generally using some of these tools and APIs. It broke immediately for me, and this activity indicator isn't anything special.

<!-- gh-comment-id:3787748783 --> @tomballgithub commented on GitHub (Jan 23, 2026): I find it odd that no one else reported this unless people aren't generally using some of these tools and APIs. It broke immediately for me, and this activity indicator isn't anything special.
Author
Owner

@misiektoja commented on GitHub (Jan 23, 2026):

Yes, that's all I did and it worked immediately.

Ok, cool! Will you make a PR for that ?

I find it odd that no one else reported this unless people aren't generally using some of these tools and APIs. It broke immediately for me, and this activity indicator isn't anything special.

Yeah, strange. I didn't do much testing during the last release either, so I didn't notice it myself.

<!-- gh-comment-id:3787756898 --> @misiektoja commented on GitHub (Jan 23, 2026): > Yes, that's all I did and it worked immediately. > Ok, cool! Will you make a PR for that ? > I find it odd that no one else reported this unless people aren't generally using some of these tools and APIs. It broke immediately for me, and this activity indicator isn't anything special. > Yeah, strange. I didn't do much testing during the last release either, so I didn't notice it myself.
Author
Owner

@tomballgithub commented on GitHub (Jan 23, 2026):

Yes I'll submit the PR

<!-- gh-comment-id:3787771058 --> @tomballgithub commented on GitHub (Jan 23, 2026): Yes I'll submit the PR
Author
Owner

@tomballgithub commented on GitHub (Jan 23, 2026):

Submitted a PR #3

<!-- gh-comment-id:3788396739 --> @tomballgithub commented on GitHub (Jan 23, 2026): Submitted a PR #3
Author
Owner

@misiektoja commented on GitHub (Jan 23, 2026):

Thx a lot, just merged!

<!-- gh-comment-id:3790488930 --> @misiektoja commented on GitHub (Jan 23, 2026): Thx a lot, just merged!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/xbox_monitor#1
No description provided.