XUser: finding an unknown local id fails with ERROR_NOT_FOUND #2073

Closed
github-bot wants to merge 1 commit from gh-pr/2073/head into gh-pr/2073/base
Owner

@⁠0xkn0wh3r3 on GitHub · 2026-11-25 04:22 UTC · original
0xkn0wh3r3:hle/xuser-find-local-id-not-found → main · +26 −1 · 1 files · 1 commits · closed without merging

The problem

A title that looks up a local id with no user gets the wrong error code back.

XUserFindUserByLocalId documents HRESULT_FROM_WIN32(ERROR_NOT_FOUND) (0x80070490) for a local id with no user. VIctory's find_by_local_id returned the XUser error E_GAMEUSER_USER_NOT_FOUND (0x89245104, USER_NOT_FOUND) instead, through the shared found helper.

Found by the conformance title in #2057, which lists this check as a known divergence.

The fix

  • find_by_local_id returns the new NOT_FOUND (0x80070490) for an unknown local id, and the user's handle for the known one as before.
  • XUserFindUserById names no specific error, so it keeps the XUser one (USER_NOT_FOUND).

Testing

  • New unit test modules::xuser::tests::an_unknown_local_id_is_not_found: the known local id finds the user; an unknown one returns NOT_FOUND and leaves the handle null; XUserFindUserById with an unknown id still returns USER_NOT_FOUND.
  • cargo test -p victory-hle: all pass. cargo clippy -p victory-hle --all-targets: clean.
  • With this and the other conformance fixes merged onto #2057's branch, its suite passes 151 of 152 checks. The remaining one, the console id, is #1717.
  • Not run with a title (no game data here).

#2057 lists this check on its test's KNOWN list. Whichever of the two merges second takes the entry off that list (a listed check that passes fails that test).

**@⁠0xkn0wh3r3** on GitHub · 2026-11-25 04:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2073) `0xkn0wh3r3:hle/xuser-find-local-id-not-found` → `main` · +26 −1 · 1 files · 1 commits · closed without merging ## The problem A title that looks up a local id with no user gets the wrong error code back. `XUserFindUserByLocalId` documents `HRESULT_FROM_WIN32(ERROR_NOT_FOUND)` (0x80070490) for a local id with no user. VIctory's `find_by_local_id` returned the XUser error `E_GAMEUSER_USER_NOT_FOUND` (0x89245104, `USER_NOT_FOUND`) instead, through the shared `found` helper. Found by the conformance title in #2057, which lists this check as a known divergence. ## The fix - `find_by_local_id` returns the new `NOT_FOUND` (0x80070490) for an unknown local id, and the user's handle for the known one as before. - `XUserFindUserById` names no specific error, so it keeps the XUser one (`USER_NOT_FOUND`). ## Testing - New unit test `modules::xuser::tests::an_unknown_local_id_is_not_found`: the known local id finds the user; an unknown one returns `NOT_FOUND` and leaves the handle null; `XUserFindUserById` with an unknown id still returns `USER_NOT_FOUND`. - `cargo test -p victory-hle`: all pass. `cargo clippy -p victory-hle --all-targets`: clean. - With this and the other conformance fixes merged onto #2057's branch, its suite passes 151 of 152 checks. The remaining one, the console id, is #1717. - Not run with a title (no game data here). ## Related #2057 lists this check on its test's `KNOWN` list. Whichever of the two merges second takes the entry off that list (a listed check that passes fails that test).
XUserFindUserByLocalId documents HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
(0x80070490) for a local id with no user, not E_GAMEUSER_USER_NOT_FOUND.
XUserFindUserById names no specific error and keeps the XUser one.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:54:00 +00:00
github-bot closed this pull request 2026-11-26 04:54:00 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 10:27 UTC · original

Automated triage for the maintainers.

find_by_local_id in crates/victory-hle/src/modules/xuser.rs now returns HRESULT_FROM_WIN32(ERROR_NOT_FOUND) (0x80070490) for an unknown local id, which the PR cites from the public XUserFindUserByLocalId reference. Before, the shared found helper returned USER_NOT_FOUND. find_by_id keeps USER_NOT_FOUND. The test covers the known id, an unknown id (the handle stays null) and the unchanged by-id path. The change is small and follows the repo rules.

CI: no check runs have been reported for this head. Whichever of this PR and #2057 merges second must drop the entry from #2057's KNOWN list.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 10:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/2073#issuecomment-7159727035) <!-- victory-triage v1 head=3dd083a3f0410bf38d444cc8a837f1cc9f74fc72 verdict=merge-candidate at=2026-11-25T10:27:28Z --> Automated triage for the maintainers. `find_by_local_id` in `crates/victory-hle/src/modules/xuser.rs` now returns `HRESULT_FROM_WIN32(ERROR_NOT_FOUND)` (0x80070490) for an unknown local id, which the PR cites from the public `XUserFindUserByLocalId` reference. Before, the shared `found` helper returned `USER_NOT_FOUND`. `find_by_id` keeps `USER_NOT_FOUND`. The test covers the known id, an unknown id (the handle stays null) and the unchanged by-id path. The change is small and follows the repo rules. CI: no check runs have been reported for this head. Whichever of this PR and #2057 merges second must drop the entry from #2057's `KNOWN` list. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:05 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the console runtime does not return that code. The public page lists HRESULT_FROM_WIN32(ERROR_NOT_FOUND), but on a console both find functions return 0x89245104 when no user matches, which is what main returns. The title's only caller ignores the HRESULT in any case.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/2073#issuecomment-7175928633) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because the console runtime does not return that code. The public page lists `HRESULT_FROM_WIN32(ERROR_NOT_FOUND)`, but on a console both find functions return `0x89245104` when no user matches, which is what `main` returns. The title's only caller ignores the HRESULT in any case. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/Marvisak--VIctory!2073
No description provided.