-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[iOS] Crash EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) on webview unmounting #3025
Comments
Hi, I'm having the same crash. |
I reverted #2930 and deployed an update of our app, it is at 2% partial rollout and so far no crash. On Thursday (10% rollout), I will confirm this. (EDIT on Thursday : confirmed) diff --git a/node_modules/react-native-webview/apple/RNCWebViewImpl.m b/node_modules/react-native-webview/apple/RNCWebViewImpl.m
index ffcf4b2..6b5a8de 100644
--- a/node_modules/react-native-webview/apple/RNCWebViewImpl.m
+++ b/node_modules/react-native-webview/apple/RNCWebViewImpl.m
@@ -436,16 +436,9 @@ - (WKWebViewConfiguration *)setUpWkWebViewConfig
return wkWebViewConfig;
}
-// react-native-mac os does not support didMoveToSuperView https://github.com/microsoft/react-native-macos/blob/main/React/Base/RCTUIKit.h#L388
-#if !TARGET_OS_OSX
-- (void)didMoveToSuperview
-{
- if (_webView == nil) {
-#else
- (void)didMoveToWindow
{
if (self.window != nil && _webView == nil) {
-#endif // !TARGET_OS_OSX
WKWebViewConfiguration *wkWebViewConfig = [self setUpWkWebViewConfig];
_webView = [[RNCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
[self setBackgroundColor: _savedBackgroundColor];
|
@Minishlink that pr I guess fixed another bug... is it safe to revert it? |
Basically, before this PR, ios webviews were rendered only when the current windows was completely focused, and not during focus. Eg. on a tab view, it was not visible while swiping the tab. If you need this behavior and it is more important that the crashes then yes, don't revert it. |
@Minishlink got it. thank you. I don't need that behaviour . we'll try to revert to version 12.4.0 waiting for the official fix. |
It might be related to the memory leak RNWW |
Bug description:
Hello, we have these crash reports on Crashlytics after an upgrade from 11.23.1 to 13.2.1
To Reproduce:
Unfortunately I could not reproduce this. It seems to happen only on iOS 16 although it might just be because of our userbase and the relative rarity of the crash (2% partial rollout of the update).
The logs indicate that the crash happens after a screen unmounts, where there was an html5 video playing via react-native-webview.
Environment:
The text was updated successfully, but these errors were encountered: