Skip to content
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

Animated.createAnimatedComponent() TypeError: Cannot read property 'remove' of undefined #6001

Closed
psquizzle opened this issue May 10, 2024 · 1 comment
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@psquizzle
Copy link

psquizzle commented May 10, 2024

Description

When running the following repository (will work in expo go)
https://github.com/psquizzle/animated-component-issue.git

I get the following error in the latest version of reanimated "react-native-reanimated": "^3.11.0" and version 3.10.0
This was previously working with "react-native-reanimated": "~3.6.2"

Render Error Cannot read property 'remove' of undefined Source 461 462 463 464 465 this. _InlinePropManager.attachInlineProps(this, this._getViewInfo()); if (IS_WEB && this. props. exiting) { saveSnapshot (this._component as HTMLE lement) ; createAnimatedComponent.tsx (463:32) AnimatedComponent#componentDidUpdate

Steps to reproduce

  1. Run example repository
  2. If you remove the useEffect that sets loaded to "true" the crash won't happen. It only occurs on rerenders

Snack or a link to a repository

https://github.com/psquizzle/animated-component-issue.git

Reanimated version

3.11.0

React Native version

0.74.1

Platforms

iOS and Android

JavaScript runtime

Hermes

Workflow

Expo Go

Architecture

Paper (Old Architecture)

Build type

Debug app & production bundle

Device

Real device

Device model

iPhone 15 Pro Max

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided Platform: Android This issue is specific to Android labels May 10, 2024
@psquizzle
Copy link
Author

psquizzle commented May 11, 2024

It seems that the issue was with my code I had animatedProps={{ value: 0 }} not to a shared value. Removing this fixes the issue.

Thank you for the great library guys :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

1 participant