You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NSInvalidArgumentException: -[RNCWebViewImpl destroyWebView]: unrecognized selector sent to instance 0x10b1e9a00 #3298
OS: iOS Simulator on MacOS
OS version: iOS Simulator 17.2 on Sonoma 14.2.1
Xcode version: Version 15.1 (15C65)
react-native version: 0.73.2
react-native-webview version: 13.6.4
Full error:
[CoreFoundation] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RNCWebViewImpl destroyWebView]: unrecognized
selector sent to instance 0x11d38d400'
*** First throw call stack:
(
0 CoreFoundation 0x0000000180491128 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018008412c objc_exception_throw + 56
2 CoreFoundation 0x00000001804a5f78 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 UIKitCore 0x000000018531b6e0 -[UIResponder doesNotRecognizeSelector:] + 232
4 STAT 0x0000000101f82dec -[RNCWebViewImpl forwardInvocation:] + 220
5 CoreFoundation 0x0000000180495054 ___forwarding___ + 732
6 CoreFoundation 0x000000018049759c _CF_forwarding_prep_0 + 92
7 STAT 0x0000000101f6a500 -[RNCWebView prepareForRecycle] + 80
8 STAT <…>
Encountered on an Expo Prebuild (aka bare/ejected) app when navigating away from a stack screen with the webview, as rendered by react-native-autoheight-webview (1.6.5) right after turning on the new architecture to test that in the app.
+1
For me, it is IOS only when the new arch is turned on
I have
react-native: 0.73.2
react-native-webview: 13.6.4
react-native-screens: 3.29.0
@react-navigation/native: 6.1.9
@react-navigation/native-stack: 6.9.17
So, the crash happens when I navigate away from WebView screen, it can be either navigation.goBack(), or just using the swipe to the right gesture on IOS.
FYI, I was able to fix it by downgrading the react-native-webview to 13.6.3 BUT in that case pod install(with new arch) were failing and I had to add the following command to my profile post-install script:
installer.pods_project.targets.each do |target|
if target.name === "react-native-webview"
append_header_search_path(target, "${PODS_ROOT}/Headers/Private/Yoga")
end
end
and define this append_header_search_path function globally on the top of podfile
def append_header_search_path(target, path)
target.build_configurations.each do |config|
# Note that there's a space character after `$(inherited)`.
config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
config.build_settings["HEADER_SEARCH_PATHS"] << path
end
end
All, facing similar issue
tried above pod file changes but it still app crashes.
Do we have any alternate approach here? Please suggest. It works good in simulator but fails badly in both iPhone/iPad.
I'm getting this issue. In my simulator works fine, but in testflight version the application breaks when the component is unmounting. The new arch is enabled
Hi there! I'm Riccardo, from the React Native core team.
Thank you so much for raising this issue. The problem should not be addressed in WebView as this issue revealed a broader problem in React Native Core.
We are going to fix it there with this pr.
Main is already fixed.
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Activity
chriszs commentedon Jan 26, 2024
Full error:
Encountered on an Expo Prebuild (aka bare/ejected) app when navigating away from a stack screen with the webview, as rendered by react-native-autoheight-webview (1.6.5) right after turning on the new architecture to test that in the app.
Can provide a minimal repro if wanted.
isinuyk commentedon Jan 26, 2024
+1
For me, it is IOS only when the new arch is turned on
I have
react-native: 0.73.2
react-native-webview: 13.6.4
react-native-screens: 3.29.0
@react-navigation/native: 6.1.9
@react-navigation/native-stack: 6.9.17
So, the crash happens when I navigate away from WebView screen, it can be either navigation.goBack(), or just using the swipe to the right gesture on IOS.
FYI, I was able to fix it by downgrading the react-native-webview to 13.6.3 BUT in that case pod install(with new arch) were failing and I had to add the following command to my profile post-install script:
and define this append_header_search_path function globally on the top of podfile
and that's it. it fixes this crash for me.
isinuyk commentedon Feb 1, 2024
what is the RN version you have? and did you get the error during pod install or the build phase?
sudheerkarumanchi commentedon Feb 5, 2024
All, facing similar issue
tried above pod file changes but it still app crashes.
Do we have any alternate approach here? Please suggest. It works good in simulator but fails badly in both iPhone/iPad.
RalissonMattias commentedon Feb 5, 2024
I'm getting this issue. In my simulator works fine, but in testflight version the application breaks when the component is unmounting. The new arch is enabled
cipolleschi commentedon Feb 19, 2024
Hi there! I'm Riccardo, from the React Native core team.
Thank you so much for raising this issue. The problem should not be addressed in WebView as this issue revealed a broader problem in React Native Core.
We are going to fix it there with this pr.
Main is already fixed.
farwayer commentedon Feb 28, 2024
unfortunately, this fix has not yet been ported to the 0.72 yet 😢
cipolleschi commentedon Feb 28, 2024
My bad... I forgot to request the pick for 0.72. :(
I created a PR react/react-native#43240 against 0.72, hopefully still in time to be merged before the release...
github-actions commentedon Apr 29, 2024
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically