feat(libSceNpCppWebApi): answer the UserProfile, ProfanityFilter and CommunicationRestrictionStatus requests offline #8561
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8561"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by DProkos on 2026-10-20T16:41:48Z.
What
Dying Light: The Beast (PPSA24003) ships no
libSceNpCppWebApi.prx, and its Epic Online Services module imports 106 exports that the library does not have, so the loader stops at start-up. This adds them, following the offline rules the library already uses (#6901):FriendsApi::getFriends,PresenceApi::getBasicPresences,BlocksApi::getBlockingUsers,ProfanityApi::filterProfanity,CommunicationRestrictionStatusApi::getCommunicationRestrictionStatus),WebApiFilterRequestFactory::createand the transactions'start/getResponseHeadersreturnSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN.{ctor,dtor,initialize,terminate}),Transactionconstruction and destruction,setOnFinishedCallback,setResponseInformationOptionandfinishsucceed without keeping state. They are listed under Silent stubs.IntrusivePtrmembers overWebApiFilterRequest,ResponseHeaderBase,StringandVector<IntrusivePtr<BasicPresence>>use the existingCopyIntrusivePtr/ReleaseIntrusivePtrhelpers with the documented reference-count offsets (0x00, 0x30 forVector);operator->,operator*andgetreturn the pointee.ResponseHeaderBase::getHeaderValueand theVector/Iteratormembers overIntrusivePtr<BasicPresence>andunsigned longthrow: a failed request never produces a response.Every added name recomputes to the NID the title imports (checked for all 106). None of them is in
main, #8264 or #8088.Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release,
BUILD_TESTING=ON, onmain587bb343e.guest_np_cpp_web_api_intrusive_ptr(extended with the 22 newIntrusivePtrmembers), the newguest_np_cpp_web_api_signed_out(the request flow of all five APIs and the factory) andguest_np_cpp_web_api_string: 3/3 passed.mainit stops at start-up on 106 unresolvedlibSceNpCppWebApi.prximports. With this change it reaches the title screen at 59.9 FPS and ran 140 s and 180 s without an error (two runs, no input). Bring-up: #8560.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pyreports no shared exports; #8264 and #7780 touch nearby lines ofcore/libs/CMakeLists.txt, and #8264 the same test arrays and debt file.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T19:05:05Z.
Two inaccuracies in
docs/dev/debt/libSceNpCppWebApi.md:Line 5 says the
finishoverrides ofTransactionBase<...>(15 instantiations) return success without doing work.Export.cppat this head has 15 such overrides, but only 13 of them return 0: the 8 already onmainand the 5 added here at L2044, L2056, L2068, L2080 and L2092. TheInGameCatalog::V5andTitleCloudStorage::V1overrides at L1610 and L1620 callNotImplemented_nid_no_patch(__func__), and line 19 of the same file lists them among the exports that throw. That is also whymainsays 8 even though it has 10 overrides.The PR description says
Transactionconstruction and destruction are listed under Silent stubs, but neither Silent stubs bullet names them. The 10 constructors and destructors at L1928-L1992 onlyreturn 0;and leave the object untouched. CONTRIBUTING.md puts silent stubs under Silent stubs, and the review of #6901 asked for constructors and destructors that succeed without storing state to be listed there.Suggested fix: on line 5, change
(15 instantiations)to(13 instantiations), and after thesetResponseInformationOptionsentence add:Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T03:35:46Z.
@DProkos thanks, the exports and tests look right. Three changes to
docs/dev/debt/libSceNpCppWebApi.mdbefore merge:finishoverrides ofTransactionBase<...>have 15 instantiations that return success. The head has 15 overrides, but only 13 return 0: the 8 onmainand your 5. TheInGameCatalog::V5andTitleCloudStorage::V1ones throw and are already listed under exports that throw. Please change it to 13, as nikowolf123 pointed out.Transaction<...>instantiations return 0 without touching the object, so they belong under Silent stubs too, for example after thesetResponseInformationOptionsentence: "The constructors and destructors of the same fiveTransaction<...>instantiations succeed without keeping state".libSceNpCppWebApi.prx".Imported from boykopovar/AnyPS5. Originally posted by DProkos on 2026-10-21T06:35:14Z.
@oneandonlydean thanks, all three are in
c12ca91ed:TransactionBase<...>::finishnow reads 13 instantiations: the 8 onmainand the 5 added here return 0; theInGameCatalog::V5andTitleCloudStorage::V1ones throw and stay under the exports that throw.Transaction<...>instantiations succeed without keeping state".libSceNpCppWebApi.prx".tools/check_conventions.py --base upstream/mainpasses.🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:45:20Z.
@DProkos thanks, all three read as described. A quick check of
c12ca91edis next, then full CI.