Skip to content

White Screen of Death issue | Enhance WebView reload detection to handle empty title strings #1552

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abroa01
Copy link

@abroa01 abroa01 commented Jul 28, 2025

Improves white screen of death prevention by checking for both nil and empty string titles when determining if WebView needs reloading.
This catches more edge cases where the WebView enters a broken state but has an empty title instead of nil.

@dpogue
Copy link
Member

dpogue commented Jul 29, 2025

One concern I have is how this would handle pages with <title></title> (or no <title> at all). Would those always trigger the reload condition?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.38%. Comparing base (1ca2e0f) to head (47f23d5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1552   +/-   ##
=======================================
  Coverage   83.38%   83.38%           
=======================================
  Files          17       17           
  Lines        1944     1944           
=======================================
  Hits         1621     1621           
  Misses        323      323           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@horner
Copy link

horner commented Jul 29, 2025

Our fix is a hack becuase our app always has a title. If there are pages without titles it could be a less than ideal fix:

Image

https://youtube.com/shorts/B6O5RNG_PZk?si=6yUSYT4AymiYsH7M

@horner
Copy link

horner commented Jul 29, 2025

@abroa01
Copy link
Author

abroa01 commented Jul 30, 2025

Meteor uses v7.1.1 of cordova-ios

Link - https://github.com/apache/cordova-ios/blob/7.1.1/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m

This is the file that gets downloaded when iOS platform is added in meteor. And I am running Meteor 3.3
image

@abroa01
Copy link
Author

abroa01 commented Jul 30, 2025

image

@horner
Copy link

horner commented Jul 31, 2025

@abroa01 let's link to the meteor project for this too.

@abroa01
Copy link
Author

abroa01 commented Aug 4, 2025

Meteor uses [email protected], which includes the CDVWebViewEngine.m file we're modifying.

This confirms that the file being patched comes from [email protected], the version bundled by Meteor.

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.

4 participants