feat(libSceNpAuth): return the signed-out error from sceNpAuthGetAuthorizedAppCode #4218

Merged
Mouad-Scriptz-0 merged 1 commit from upstream-pr/4218 into main 2026-10-12 21:00:05 +00:00
Mouad-Scriptz-0 commented 2026-10-12 01:39:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-12T01:39:40Z.


What

After its sign-in dialog Minecraft (PPSA17221) calls sceNpAuthGetAuthorizedAppCode, which #4118 declares as a throwing stub because the title fails to load without the import. There is no PSN sign-in, so it now returns SCE_NP_ERROR_SIGNED_OUT without reading its unknown parameters, and the title treats that as offline play. The request, token and wait calls this PR implemented earlier are left to #3604, which models them per request and is further along in review.

  • sceNpAuthGetAuthorizedAppCode returns SCE_NP_ERROR_SIGNED_OUT.
  • New test target guest_np_auth_authorized_app_code_tests (guest_np_auth_authorized_app_code) checks the result on repeated calls.
  • The TechnicalDebt entry from #4118 records the signed-out answer.

Tested

Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON), branch on #4118 rebased onto main c36fd0a0e: guest_np_auth_authorized_app_code passes; tools/check_conventions.py --base origin/main and git diff --check pass. Minecraft (PPSA17221) reaches its menu and plays with the earlier, wider version of this change (Linux). Not tested on Windows.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #4118 (branch is based on it; the first commit is that PR's). #3604 implements the request calls.
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4823928498 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4218). Originally posted by [Mouad-Scriptz-0](https://github.com/Mouad-Scriptz-0) on 2026-10-12T01:39:40Z. --- ### What After its sign-in dialog Minecraft (PPSA17221) calls `sceNpAuthGetAuthorizedAppCode`, which #4118 declares as a throwing stub because the title fails to load without the import. There is no PSN sign-in, so it now returns `SCE_NP_ERROR_SIGNED_OUT` without reading its unknown parameters, and the title treats that as offline play. The request, token and wait calls this PR implemented earlier are left to #3604, which models them per request and is further along in review. - `sceNpAuthGetAuthorizedAppCode` returns `SCE_NP_ERROR_SIGNED_OUT`. - New test target `guest_np_auth_authorized_app_code_tests` (`guest_np_auth_authorized_app_code`) checks the result on repeated calls. - The TechnicalDebt entry from #4118 records the signed-out answer. ### Tested Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`), branch on #4118 rebased onto `main` c36fd0a0e: `guest_np_auth_authorized_app_code` passes; `tools/check_conventions.py --base origin/main` and `git diff --check` pass. Minecraft (PPSA17221) reaches its menu and plays with the earlier, wider version of this change (Linux). Not tested on Windows. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #4118 (branch is based on it; the first commit is that PR's). #3604 implements the request calls. - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-12 01:40:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T01:40:04Z.


Progress report (2fabe44 → 09c9854)

📈 System libraries: 87.43% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNpAuth sceNpAuthGetAuthorizedAppCode
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceNpAuth sceNpAuthGetAuthorizedAppCode
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116235298 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4218#issuecomment-6116235298). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T01:40:04Z. --- <!-- progress-report --> ### Progress report (2fabe44 → 09c9854) 📈 **System libraries**: 87.43% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceNpAuth | `sceNpAuthGetAuthorizedAppCode` | </details> <details> <summary>⚪ 1 behaviourally empty (constant return or throw)</summary> | Library | Name | | - | - | | libSceNpAuth | `sceNpAuthGetAuthorizedAppCode` | </details>
xXPBSXx commented 2026-10-12 16:27:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T16:27:18Z.


Windows test of head 5edd2be1c merged onto current main (2a5eca11c, clean merge; built together with two other open PRs, so the run is for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors, -j2.

guest_np_auth_authorized_app_code (the test this PR adds) passes. The 25 tests matching ^(guest_memory|guest_np_auth|windows_exceptions|guest_exception|guest_kernel) all pass.

Not checked: that the test fails without the change, Linux, a title run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6128327939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4218#issuecomment-6128327939). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T16:27:18Z. --- Windows test of head `5edd2be1c` merged onto current `main` (`2a5eca11c`, clean merge; built together with two other open PRs, so the run is for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors, `-j2`. `guest_np_auth_authorized_app_code` (the test this PR adds) passes. The 25 tests matching `^(guest_memory|guest_np_auth|windows_exceptions|guest_exception|guest_kernel)` all pass. Not checked: that the test fails without the change, Linux, a title run. AI-assisted (Claude Code).
adriadam10 commented 2026-10-12 20:57:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:57:17Z.


Checked: the new test fails without the change and passes with it; rebased onto current main (only conflict: the TechnicalDebt line moved to docs/dev/debt/libSceNpAuth.md, updated there); build and ctest green; the signed-out value matches the constant already used in libSceNpUtility; Windows test by @xXPBSXx and Minecraft Settings check by @Pacuka noted. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132479256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4218#issuecomment-6132479256). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-12T20:57:17Z. --- Checked: the new test fails without the change and passes with it; rebased onto current `main` (only conflict: the TechnicalDebt line moved to `docs/dev/debt/libSceNpAuth.md`, updated there); build and ctest green; the signed-out value matches the constant already used in libSceNpUtility; Windows test by @xXPBSXx and Minecraft Settings check by @Pacuka noted. Merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
boykopovar/AnyPS5!4218
No description provided.