OS: ios
RN version: 0.58.3
RNGH version: 1.0.15

I have same issue with:
"react-navigation": "^3.1.0",
"react-native-gesture-handler": "^1.0.15",
I did put import 'react-native-gesture-handler' on top of index.js but it's doesn't work :(
Version 1.0.14 does not seem to have this problem.
@kmagiera Can we get a status or an update about this issue?
cc @osdnk
I'm experiencing this exception on iOS while navigating back in StackNavigator using swipe or back button.
Other React Navigation users also suffered from this issue and seems that most of them go with downgrade: https://github.com/react-navigation/react-navigation/issues/5208
Only three commits has been added between 1.0.14 and 1.0.15 and after a bit of research I can tell that changes from commit 35c57a0f4930210c3b152e33e814e97ec1e23d92 (#429) are causing this exception but I'm not sure why.
Hello, could you please assure that you're actually requiring RNGH on very top level of your app. I mean you could add some console.log on top of GestureHandler.js and then determine whether it's really invoking on App's start.
Hello all!
Thanks for reporting the issue, however in the future it would be much easier for us to address your problems quicker, if you help us and prepare a small repo that reproduces the problem.
I went ahead to try it and started new project with RN 0.58.4 and GH 1.0.15 (similar setup to what @musicode posted) here https://github.com/kmagiera/GHBug439 – apparently the problem cannot be reproduced there.
It makes sense to try @osdnk suggestion and add the following code to your main javascript file (e.g. usually it is App.js file):
require('react-native-gesture-handler');
Gesture handler lib requires that parts of the library code runs on load time (specifically even registration code that is the reason why you're seeing the crash).
I have testes the newest version with an Example app on 0.58.4 and 0.58.0 version of RN on Android and iOS in release and debug mode as well and still can't observe the problem. I believe it's possible that it breaks in some cases, but I'm seriously not able to reproduce.
If you face with a problem please attach an example with newest version of RN and RNGH and deterministic steps to observe the case.
For what it's worth, I've just upgraded from RN 0.55.4 to 0.58.6 and no longer seem to have this issue.
Prior to that, it occurred anytime I used any version of RNGH > 1.0.14, but only on iOS. Android has always been fine for me.
EDIT: I should add that the error happened to me when navigating to a new screen in a (react-navigation) stackNavigator, and then pressing the back button in the top header. Again, iOS only.
Issue is still occurring with RN 0.58.6 and RNGH 1.0.17 in my iOS app. Same circumstances as @wbercx mentioned. Also "swipe back" gesture (swipe from most left edge of display) generates this error for me. Not much changed from last message: https://github.com/kmagiera/react-native-gesture-handler/issues/439#issuecomment-462834883.
EDIT:
Yesterday I have moved my whole app navigation structure to https://github.com/kmagiera/GHBug439 but unfortunately exception didn't occurred even after that.
Just facing the same problem in 0.59.0 when i turn on inlineRequires in metro.config.js which introduced in react native 0.59.0. After i change inlineRequires to false, everything works fine.
But inlineRequires off can causes slower app launches. Looking forward the answer which can turn on inlineRequires without conflicting react-native-gesture-handler.
same issue as @tikkichan4 on RN 0.59 and [email protected] with inlineRequires: true
Closing in favor of #320.
Most helpful comment
Version
1.0.14does not seem to have this problem.