Skip to content

Card component breaks on expo 53.0.0 and react-native 0.79.2 (Android only) #4714

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

Open
fabriziocucci opened this issue May 5, 2025 · 2 comments
Assignees

Comments

@fabriziocucci
Copy link
Contributor

fabriziocucci commented May 5, 2025

Current behaviour

When pressing on the Card, the following error is thrown:

 ERROR  [05-05-2025 10:42:27]
{"componentStack": undefined, "id": "ci21wj", "message": "You attempted to set the key `_animation` with the value `{\"__active\":false,\"__isInteraction\":true,\"__iterations\":1,\"_toValue\":2,\"_duration\":150,\"_delay\":0}` on an object that is meant to be immutable and has been frozen.", "source": "global-handler", "stack": "Error: You attempted to set the key `_animation` with the value `{\"__active\":false,\"__isInteraction\":true,\"__iterations\":1,\"_toValue\":2,\"_duration\":150,\"_delay\":0}` on an object that is meant to be immutable and has been frozen.

  74 |  * LTI update could not be added via codemod */
  75 | function throwOnImmutableMutation(key: empty, value) {
> 76 |   throw Error(
     |              ^
  77 |     'You attempted to set the key `' +
  78 |       key +
  79 |       '` with the value `' +

Call Stack
  throwOnImmutableMutation (packages/mobile/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js:76:14)
  animate (packages/mobile/node_modules/react-native/Libraries/Animated/nodes/AnimatedValue.js:312:20)
  start (packages/mobile/node_modules/react-native/Libraries/Animated/AnimatedImplementation.js:231:26)
  start (packages/mobile/node_modules/react-native/Libraries/Animated/AnimatedImplementation.js:238:14)
  runElevationAnimation (packages/mobile/node_modules/react-native-paper/src/components/Card/Card.tsx:222:15)
  useLatestCallback$argument_0 (packages/mobile/node_modules/react-native-paper/src/components/Card/Card.tsx:228:26)
  apply (packages/mobile/<native>)
  latestCallback (packages/mobile/node_modules/use-latest-callback/lib/src/index.js:42:33)
  onPressIn (packages/mobile/node_modules/react-native/Libraries/Components/Pressable/Pressable.js:263:20)
  _activate (packages/mobile/node_modules/react-native/Libraries/Pressability/Pressability.js:771:16)
  _performTransitionSideEffects (packages/mobile/node_modules/react-native/Libraries/Pressability/Pressability.js:738:21)
  _receiveSignal (packages/mobile/node_modules/react-native/Libraries/Pressability/Pressability.js:696:41)
  responderEventHandlers.onResponderGrant (packages/mobile/node_modules/react-native/Libraries/Pressability/Pressability.js:468:30)
  executeDirectDispatch (packages/mobile/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js:613:61)
  ResponderEventPlugin.extractEvents (packages/mobile/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js:14216:59)
  batchedUpdates$1$argument_0 (packages/mobile/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js:1386:59)
  batchedUpdatesImpl (packages/mobile/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js:16520:18)
  batchedUpdates$1 (packages/mobile/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js:1343:34)
  dispatchEvent (packages/mobile/http:/127.0.0.1:8081/packages/mobile/index.bundle)

On iOS, everything works fine.

Expected behaviour

When pressing on the Card, everything should simply work.

How to reproduce?

coming soon

Preview

N/A

What have you tried so far?

Replace the Card with simple View.

Your Environment

software version
ios x
android x
react-native 0.79.2
react-native-paper 5.14.0
node x.x.x
npm or yarn x.x.x
expo sdk 53.0.0
@lukewalczak lukewalczak self-assigned this May 5, 2025
@lukewalczak
Copy link
Member

Hey @fabriziocucci, I've tried to reproduce it on the new react native project with expo 53, however without success. Please add a repro 🙏🏽

@fabriziocucci
Copy link
Contributor Author

@lukewalczak trying as we speak, it looks like the repro is more complicated than expected! 🙁

I currently have a list (vertical) of lists (horizontal), where each item of the horizontal lists is a Card.

Still not sure what's the exact repro but I'll try to gradually narrow down the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants