iosreact-nativeios17

react-native on iOS17, Exception thrown while executing UI block: 'parentNode' is a required parameter


I am running my react native app on an iOS device, my UI elements are not rendered unless i reload the app I have tried rending other elements, removing elements one by one, it's not clear to me what exactly is causing the issue

The production release of the app seems to be working fine on all iOS devices, i have gone through removing and re-installing pods and node packages, reordering the build phases (in regards to including frameworks and libraries) more than once, unfortunately i can't remember the difference regarding all these details

It's a legacy app and i am not familiar with all the stack / components but i know enough, i am just not sure what am i looking for to solve this issue

I only get this error on iOS 17.0 and any release that came after (as of today iOS 17.1)

The error message:


Exception thrown while executing UI block: 'parentNode' is a required parameter

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
   RCTUIManager.m:1201
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.206
__RCTExecuteOnMainQueue_block_invoke
149FF9CD-3E92-321D-B92F-EF58717C70B6
149FF9CD-3E92-321D-B92F-EF58717C70B6
149FF9CD-3E92-321D-B92F-EF58717C70B6
_dispatch_main_queue_callback_4CF
CEB74A0C-5EA4-3F5A-9DE8-73F0DAD2F4CB
CEB74A0C-5EA4-3F5A-9DE8-73F0DAD2F4CB
CFRunLoopRunSpecific
GSEventRunModal
EC1206D7-B4C9-3257-BB63-08E26A802416
UIApplicationMain
main
0D856E72-9A63-3B5B-879F-8D026115A4F0

react-native info

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
    Memory: 42.08 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.6.1 - ~/.nvm/versions/node/v16.6.1/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 7.20.3 - ~/.nvm/versions/node/v16.6.1/bin/npm
    Watchman: 2023.09.04.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.68.2 => 0.68.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

I wonder if any one is facing this issue with iOS 17. if i should hold off spending a lot of time of investigating this (on a strict timeline) due to the fresh release of iOS 17, but i don't have / can't have userbase information in that regard


Solution

  • I strongly suggest that you go through the Xcode logs generated (and not just the metro logs).

    In my case, the same issue was related to using FastImage inside TouchableWithoutFeedback which I fixed by replacing TouchableWithoutFeedback with TouchablOpacity with prop activeOpacity={1.0}, thanks to the advice here: https://github.com/DylanVann/react-native-fast-image/issues/1020#issuecomment-1873820210