software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.06k stars 1.31k forks source link

[Android] Shared Element transition crashes on android when using presentation: 'transparentModal' #4479

Open iamitkhatkar opened 1 year ago

iamitkhatkar commented 1 year ago

Description

Hey,

I have implemented the shared element transition with the presentation style 'transparentModal', it works fine in ios and even in Android if we set the presentation to 'modal' but it crashes and gives an error "Attempt to invoke virtual method 'java.util.Hashmap com.swmansion.reanimated.layoutReanimated.Snapshot.toTargetMap()' on a null object reference

Screenshot_1684528049

Steps to reproduce

  1. Add two screens in the native stack navigator
  2. set presentation style to 'modalTransparent'
  3. open the second screen
  4. it will not show any animation and when we go back to the previous screen it will crash

Snack or a link to a repository

https://github.com/iamitkhatkar/react-native-instagram-navigation

Reanimated version

3.1.0

React Native version

0.71.7

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

Android emulator

Device model

No response

Acknowledgements

Yes

MattNic2 commented 1 year ago

Was a fix ever found for this? I am running into the same exact problem.

jhylmb commented 1 year ago

Same problem here.

mldb commented 1 year ago

+1

ansh commented 1 year ago

I am facing this issue as well.

ansh commented 1 year ago

My issue is slightly different as in the package versions are different and I am also using Expo Go. Opened ticket at #5120