Skip to content

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

@fabriziocucci

Description

@fabriziocucci

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions