Skip to content

fix: Small adjustment to fix epic offline mode caching.#1566

Open
phobos665 wants to merge 1 commit into
utkarshdalal:masterfrom
phobos665:fix/epic-offline-adjustment
Open

fix: Small adjustment to fix epic offline mode caching.#1566
phobos665 wants to merge 1 commit into
utkarshdalal:masterfrom
phobos665:fix/epic-offline-adjustment

Conversation

@phobos665

@phobos665 phobos665 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Small change that removes the detection for Offline from the starting of Epic Games:

We had a bug where the isOffline check was getting into an incorrect state and wrongly reporting as "true" even if the device was online. The best thing for us to do is pass only the container state for isEpicOffline and if the device is offline and fails to reach Epic's servers, it'll automatically launch offline.

Recording

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

Fix Epic launch offline-mode caching by removing ad-hoc offline detection and using only container.isEpicOfflineMode when building launch parameters. Prevents false offline launches while still allowing Epic to auto-launch offline if the network is unavailable.

Written for commit c64da25. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Adjusted Epic game offline mode handling to use the application's offline setting rather than external parameters during launch.

@phobos665 phobos665 requested a review from utkarshdalal as a code owner June 10, 2026 14:26
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d4ea0ac-f4d7-4873-a041-7e4861a19847

📥 Commits

Reviewing files that changed from the base of the PR and between a0b49d1 and c64da25.

📒 Files selected for processing (1)
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

📝 Walkthrough

Walkthrough

This PR modifies how Epic's offline launch mode is determined in getWineStartCommand. The Epic service now receives container.isEpicOfflineMode directly, removing the prior logic that combined this with the caller-provided offline flag.

Changes

Epic Offline Mode Parameter

Layer / File(s) Summary
Epic offline parameter source
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
EpicService.buildLaunchParameters is now passed container.isEpicOfflineMode exclusively, removing the offline || container.isEpicOfflineMode combination that previously allowed the caller's offline flag to trigger Epic's offline mode.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

A rabbit hops through Epic's way,
One offline flag had its day,
Now container leads the call,
Parameter pure—that's all! 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing Epic offline mode caching by removing problematic offline detection logic.
Description check ✅ Passed The description covers all required template sections: a clear explanation of the bug and fix, type of change marked, and checklist items completed. A recording was noted as attached.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

val runArguments: List<String> = runBlocking {
val offlineLaunch = offline || container.isEpicOfflineMode;
val result = EpicService.buildLaunchParameters(context, container, game, offlineLaunch)
val result = EpicService.buildLaunchParameters(context, container, game, container.isEpicOfflineMode)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is right - offline is coming from whether we are in offline mode at the app level, not detecting if we are offline afaict. Could you please confirm and point out where you think offline mode is being set/cached if so?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my testing XServerScreen gives inconsistent results for "offline" even if my device is clearly online.

I believe it's better for the behaviour of Epic for it to check for offline toggle, and fail graciously if the device is offline and the toggle is off.

This way, there's no oddities regarding Epic being launched offline when it should happen online.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offline for Epic is hardcoded false at PluviaMain.kt:362 though, no? So this change shouldn't make any difference at all. If you're seeing this bug then it's likely from somewhere else, unless I'm wrong and offline is ever true. Could you please check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants