PanGestureHandler "Failed to obtain view" error in SDK 54 even after migration to new Gesture API #3703
Replies: 3 comments
-
Same problems |
Beta Was this translation helpful? Give feedback.
-
Hi! This error was added in 2.22.0, so it's been there for a while. I'm not sure which version was included in Expo SDK 53, but I think it was already there. IIRC |
Beta Was this translation helpful? Give feedback.
-
Just downgrade Expo to 52 and never upgrade again. Expo 43+ introduces React 19 and is buggy because it uses React 19 and this ecosystem won't support React 19 for another 20 years. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
After upgrading to Expo SDK 54 ([[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected])), I am consistently seeing the following error when the app renders certain screens:
This did not occur in SDK 53, even though
PanGestureHandler
was already deprecated then. In 54, it seems much stricter and blocks rendering entirely.Steps taken / current setup:
Removed all direct usage of
PanGestureHandler
andSwipeable
in my own code. Migrated swiping toGesture.Pan()
+GestureDetector
with Reanimated shared values.Replaced
Swipeable
rows with customGestureDetector
wrappers.Ensured every Modal is wrapped with a local
GestureHandlerRootView
.Top-level
App.tsx
wraps everything inGestureHandlerRootView
and includesimport 'react-native-gesture-handler'
at the very top.Verified only one RNGH version installed (
2.28.0
).Cleared Metro, watchman, build caches.
Babel config:
Ran project-wide search for
PanGestureHandler
,Swipeable
,State
imports. None left in app code.Problem:
Despite the migration, the runtime still throws this error when certain screens mount. This happens even though:
GestureHandlerRootView
.It looks like something (maybe internal to RNGH or a dependent library) is still mounting the old
PanGestureHandler
. This didn’t crash in SDK 53, but does in 54.Questions / Request:
Environment:
This issue is blocking migration since the app ran in SDK 53 but now crashes in SDK 54. Any guidance on how to safely transition (or identify the offending component) would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions