Fix Epic games crashing on login when the account still needs scope consent

Merged
UT
10d ago
+275-2

Description

Reported in the "Alex kidd in miracle world, launch issue" support thread: the game crashed on Play but ran from the container and in Epic offline mode. The diagnostic log put the crash inside EOSSDK-Win64-Shipping.dll (1.12.0) on the path that handles EOS_Auth_ScopeConsentRequired from the exchange-code login. Epic's SDK 1.13 notes list the fix: "Fixed possible crash via the exchange code flow in EOS_Auth_Login when additional consent is required."

Two changes:

  • EpicSdkUpdateDependency: before an Epic launch, find EOSSDK-Win64-Shipping.dll files with a product version below 1.13, download SDK 1.19.2.1 from the CDN, keep the original as .gn-orig and copy the new DLL over. Epic documents the SDK as a drop-in binary upgrade. One export was dropped between 1.12 and 1.19 (EOS_RTCAdmin_GetUserRoomTokenCount); the dependency scans the game's exe/dll files for that name and leaves the SDK alone if anything imports it. Failures log and let the launch continue.
  • WineRequestComponent: the consent page the SDK opens goes through winebrowser to this component, which was dead by default. It read open_web_links_externally with default false while Settings shows true, and its Epic match was https://epicgames.com, which never matches the real https://www.epicgames.com/id/... URL. Now Epic /id/ pages open in the in-app Epic WebView (already signed in) and other links open in the Android browser, unless the user turned the setting off.

Tested on the Odin 3 with FNAF: Into the Pit (ships SDK 1.17, so the swap is a no-op and the game runs). Ran winebrowser inside the live container: a generic URL opened Chrome, an Epic /id/login URL opened the in-app Epic WebView. No owned Epic game ships SDK 1.12 or older, so the swap itself is covered by unit tests only; the reporter's next online launch is the real check. The 32-bit EOSSDK-Win32-Shipping.dll is not handled.

Recording

Screenshots were taken during testing but not attached; the visible change is the Epic consent page opening in the app instead of the game crashing.

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Fixes Epic games crashing on login when the account still needs scope consent, by swapping outdated EOS SDK DLLs for a newer drop-in build before launch.

  • Detects EOSSDK-Win64-Shipping.dll files older than SDK 1.13 and replaces them with SDK 1.19.2.1 from the CDN, keeping the original as .gn-orig.
  • Skips the swap if the game imports EOS_RTCAdmin_GetUserRoomTokenCount, an export the newer SDK dropped; failures log and let the launch continue.
  • Fixes the consent page routing: Epic /id/ URLs now open in the in-app Epic WebView and other links in the Android browser, matching the open_web_links_externally setting default.

Migration: none. The 32-bit EOSSDK-Win32-Shipping.dll is not handled.

Summary by CodeRabbit

  • New Features
    • Epic games can now receive an update to an outdated EOS SDK during launch when it is safe to do so. Existing SDK files are backed up before replacement.
  • Bug Fixes
    • Epic sign-in links are now recognized based on their website address and path, reducing incorrect routing.
    • Web links are set to open externally by default.