Skip to content

[v3] App crashes when using React.StrictMode #4172

@satya164

Description

@satya164

Description

Gesture Handler v3 seems incompatible with React.StrictMode. When the app is wrapped in strict mode:

  • On iOS the app instantly crashes. In the XCode logs, I see *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Handler for tag 1 does not exists'
  • On Android, I don't see a relevant log or error, but the gestures don't work
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-13.at.10.38.39-optimised.mov
untitled-optimised.mp4

Removing React.StrictMode makes the gestures work both on Android & iOS.

PS: The repro uses Community CLI, but I'm also had an error on Expo in my existing code. Though the error was different:

Image

Steps to reproduce

  1. Clone git@github.com:satya164/GestureHandlerStrictModeRepro.git
  2. Build and run the app on Android emulator and iOS simulator
  3. Observe gesture not working/app crashing
  4. Edit App.tsx to remove React.StrictMode and observe that the gestures work

A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.

https://github.com/satya164/GestureHandlerStrictModeRepro

Gesture Handler version

3.0.0-beta.4

React Native version

0.85.3

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

None

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

Platform: AndroidThis issue is specific to AndroidPlatform: iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions