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

Description

While working on React Native Gallery Toolkit, I’ve got this error.

I’m not sure how to reproduce it in some playground, not sure what exactly causes it:

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

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
    RCTUIManager.m:1192
-[REANodesManager performOperations]
-[REANodesManager onAnimationFrame:]
CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long)
display_timer_callback(__CFMachPort*, void*, long, void*)
__CFMachPortPerform
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
__CFRunLoopDoSource1
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
0x0

Screenshots

image

Steps To Reproduce

  1. Clone this repo https://github.com/terrysahaidak/react-native-gallery-toolkit
  2. Switch to tr-lightbox branch and run the Example project
  3. Navigate to Lightbox => Shared Element Transition
  4. Open/close image a few times in a row.

The error might occur after a few reloading or immediately.

Expected behavior

Should not throw the error.

Actual behavior

Throws an error but still works if I just close it.

Snack or minimal code example

  1. Clone this repo https://github.com/terrysahaidak/react-native-gallery-toolkit
  2. Switch to tr-lightbox branch and run the Example project

Package versions

  • React: 16.13.1
  • React Native: 0.63.2
  • React Native Reanimated: 2.0.0-alpha.7

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (10 by maintainers)

Commits related to this issue

Most upvoted comments

The fix here is to disable TurboModules for all the modules except Reanimated. Its landed in master, should be available with the new release. I will keep this issue open until.

Do you know when the next reanimated alpha 8 will be released ?

Hello, facing the same problem in Alpha 8. I thought it was solved but it’s not 😢

I will use it for a few days and let know if it’s fixed with alpha.8

how can you solved this, i faced this issue too

Just submitted #1501 which addresses the issue we think was causing the crash. If some of you are still experiencing it can you please try out this patch to see if it resolves the issue for you?

@kmagiera The issue was gone after start new metro server and application. I don’t know the exact reason. But sometimes, it happened at device orientation change(portrait -> landscape). I am not paying attention to this issue now because it is not reproduced after that. Thank you for your concerns

hey @mym0404 and @JB-CHAUVIN – any change you can share your code for us to try and reproduce the crash? If not maybe you can describe at what stage the crash happens, e.g., at app startup / when starting some animation / when instantiating some components on the screen.

Hello everyone! I’ve noticed some activity here, some people still seem to have this problem. As this issue is closed I think the best thing you can do if you’re facing this is either open a new one or reopen this one.

With that said, posting a screen with this error occurring or just saying that you have this problem, gives us nothing. If you decide to reopen the issue/open a new issue connected to this one, please provide a reproducing example and some more information regarding the circumstances in which this happens(is it a fresh rn app, and if it’s not then what’s the background, like did you move from rea 1 to rea2 or what, what are packages modules, stuff like that).

Thank you for the cooperation, if there’s a problem I’m happy to help! ✌️

This is reproduced on alpha.9

In my case, I fixed this issue by converting other combined use cases using react-native Animated API to Reanimated 2 API. But it seems to don’t fix completely.

alpha.8 has this solved. please make sure to undo all the installation guide things from previous versions and clear the cache before the build.

Having the same issue with RN 0.61.2 and "react-native-reanimated": "^1.13.1"

The fix here is to disable TurboModules for all the modules except Reanimated. Its landed in master, should be available with the new release. I will keep this issue open until.