bberak / react-native-game-engine-handbook

A React Native app showcasing some examples using react-native-game-engine 🐒✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error when using the left arrow to go back

Ladvace opened this issue · comments

If you go on "Touch Events" and then you try to go back you will have this error:
`Invariant Violation: [105,"RCTImageView",{"marginLeft":"<>"}] is not usable as a native
method argument

This error is located at:
in RCTImageView (at Image.android.js:254)
in Image (at createAnimatedComponent.js:151)
in AnimatedComponent (at createAnimatableComponent.js:571)
in withAnimatable(Image) (at backButton.js:53)
in RCTView (at View.js:45)
in View (at createAnimatedComponent.js:151)
in AnimatedComponent (at TouchableOpacity.js:282)
in TouchableOpacity (at backButton.js:45)
in BackButton (at table-of-contents/index.js:85)
in RCTView (at View.js:45)
in View (at table-of-contents/index.js:122)
in RCTView (at View.js:45)
in View (at ScrollView.js:976)
in RCTScrollView (at ScrollView.js:1115)
in ScrollView (at table-of-contents/index.js:119)
in RCTView (at View.js:45)
in View (at GameEngine.js:176)
in RCTView (at View.js:45)
in View (at GameEngine.js:163)
in GameEngine (at table-of-contents/index.js:99)
in RCTView (at View.js:45)
in View (at NativeLinearGradient.android.js:23)
in NativeLinearGradient (at LinearGradient.js:12)
in LinearGradient (at table-of-contents/index.js:94)
in TableOfContents (at App.android.js:41)
in RCTView (at View.js:45)
in View (at App.android.js:40)
in App (at withExpoRoot.js:20)
in RootErrorBoundary (at withExpoRoot.js:19)
in ExpoRootComponent (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)

  • node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:253:8 in enqueueNativeCall
  • node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:137:8 in fn
  • ... 21 more stack frames from framework internals`

Sorry I missed this issue @Ladvace..

I recently bought a new Android phone so will try reproduce this.

Thanks for the report.

Hi @Ladvace,

I've just updated the app to work with the latest version of Expo. I've also fixed this issue. Upgrade steps:

cd react-native-game-engine-handbook
rm -rf node_modules
git pull
npm install -g expo-cli
npm install
npm run start
# You might also need to update the Expo client on your devices

If it helps, I'm running the following versions:

node -v: v12.13.0
npm -v: 6.12.0
expo --version: 3.21.13

Let me know how that goes, cheers!

Hi @Ladvace,

I'm closing this issue for now, but please feel free to re-open it if necessary. Cheers!