Skip to content

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 cordova-ios@7.1.1, which includes the CDVWebViewEngine.m file we're modifying.

This confirms that the file being patched comes from cordova-ios@7.1.1, the version bundled by Meteor.

dpogue added a commit to dpogue/cordova-ios that referenced this pull request Nov 5, 2025
This adds a `CrashRecoveryBehavior` preference with options `"refresh"`
(default - try to refresh the WebView URL) and `"reload"` (load the
starting page again in the WebView).

This doesn't solve the root issue where sometimes refreshing the WebView
still results in a blank screen, but gives people the option to force a
full reload (which seems to be what people are using as a workaround for
the blank screen bug).

Closes apacheGH-1232.
Closes apacheGH-1235.
Closes apacheGH-1355.
Closes apacheGH-1393.
Closes apacheGH-1533.
Closes apacheGH-1552.
@dpogue dpogue closed this in 5a13d63 Nov 9, 2025
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