Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: iOS App Shows Blank White Screen After Being in Background for a Few Hours #7793

Closed
1 of 3 tasks
yashoda-esb opened this issue Dec 4, 2024 · 2 comments
Closed
1 of 3 tasks
Labels

Comments

@yashoda-esb
Copy link

yashoda-esb commented Dec 4, 2024

Capacitor Version

5.7.0

Other API Details

npm version: 10.2.3
node version 18.19.0

App Framework: Angular + Capacitor
Device: iPhone 12 and in the latest version as well

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

When the app is resumed:

  • A blank white screen is displayed.

  • Inspecting via Safari Web Inspector shows the tag is empty.

  • No UI or functional elements are visible.
    blank-screen-issue

Expected Behavior

The app should resume from where it was paused, with all UI elements intact and functional.

Project Reproduction

I cannot share my project's code due to confidentiality. However, you can use the official Capacitor starter template with angular the reproduction steps are given above

Additional Information

When using my app on an iOS device, if I put the app in the background (pause mode) for several hours, and then resume it later, the app shows a blank white screen. Inspecting the DOM reveals that the tag is empty, and none of the expected UI elements or app content is displayed.

This issue occurs only on iOS devices and does not seem to affect Android.

Steps to Reproduce

  1. Open the app on an iOS device.
  2. Perform normal app operations (any feature or page).
  3. Minimize the app by pressing the home button or switching to another app.
  4. Wait for several hours (or a significant period, like overnight).
  5. Resume the app by selecting it from the background.
@jcesarmobile
Copy link
Member

This is usually caused by the WebView being terminated by the OS while the app is in background due to low memory.
That causes the WebView to reload and depending on how your app is built/configured can cause the white screen, i.e. if you use a router and it's not able to "recreate" the page from the current url.

Here you can see some different solutions for different frameworks
#7097

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
Copy link

ionitron-bot bot commented Jan 3, 2025

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants