Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: method.bind is not a function Issue with react native 0.59.0 #303

Open
vikrantnegi opened this issue Mar 13, 2019 · 14 comments
Open

Comments

@vikrantnegi
Copy link

@vikrantnegi vikrantnegi commented Mar 13, 2019

What is the problem?

Getting TypeError:

ExceptionsManager.js:74 TypeError: method.bind is not a function

This error is located at:
    in Path (at animated-path.js:72)
    in AnimatedPath (at chart.js:119)
    in RNSVGSvgView (at Svg.js:83)
    in Svg (at chart.js:110)
    in RCTView (at View.js:45)
    in View (at chart.js:107)
    in RCTView (at View.js:45)
    in View (at chart.js:106)
    in Chart (at Challenge.js:112)
    in RCTView (at View.js:45)
    in View (at Challenge.js:75)
    in Challenge (at withCharts.js:186)
    in _temp (created by SceneView)
    in SceneView (at StackViewLayout.js:795)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.js:69)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:860)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at StackViewLayout.js:311)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.js:307)
    in PanGestureHandler (at StackViewLayout.js:300)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.js:79)
    in RCTView (at View.js:45)
    in View (at Transitioner.js:215)
    in Transitioner (at StackView.js:22)
    in StackView (created by Navigator)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (created by SceneView)
    in SceneView (at StackViewLayout.js:795)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.js:69)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:860)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at StackViewLayout.js:311)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.js:307)
    in PanGestureHandler (at StackViewLayout.js:300)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.js:79)
    in RCTView (at View.js:45)
    in View (at Transitioner.js:215)
    in Transitioner (at StackView.js:22)
    in StackView (created by Navigator)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (created by SceneView)
    in SceneView (created by SwitchView)
    in SwitchView (created by Navigator)
    in Navigator (at createAppContainer.js:388)
    in NavigationContainer (at routes.js:109)
    in Routes (at App.js:51)
    in RCTView (at View.js:45)
    in View (at App.js:49)
    in App (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)

When does it happen?

I'm using AreaChart in my App and when I remove it error is not there.

What platform?

  • [ x ] iOS
  • Android (Not checked)

React Native version: 0.59.0

@marcorm

This comment has been minimized.

Copy link

@marcorm marcorm commented Mar 13, 2019

I've got similar error with:
"react": "16.8.3",
"react-native": "^0.59.0",
"react-native-svg": "7.1.2",
"react-native-svg-charts": "5.2.0"

TypeError: method.bind is not a function. (In 'method.bind((0, _assertThisInitialized2.default)(_this))', 'method.bind' is undefined)

This error is located at:
    in Svg (at chart.js:110)
    in RCTView (at View.js:45)
    in View (at chart.js:107)
    in RCTView (at View.js:45)
    in View (at chart.js:106)
    in Chart (at SaldoAndamentaleChart.js:201)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at SaldoAndamentaleChart.js:200)
    in RCTView (at View.js:45)
    in View (at SaldoAndamentaleChart.js:199)
    in SaldoAndamentaleChart (at CardConto.js:82)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at CardConto.js:80)
    in RCTView (at View.js:45)
    in View (at ImageBackground.js:63)
    in ImageBackground (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(ImageBackground))
    in Styled(ImageBackground) (at CardConto.js:78)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at CardConto.js:77)
    in TouchableWithoutFeedback (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(TouchableWithoutFeedback))
    in Styled(TouchableWithoutFeedback) (at CardConto.js:76)
    in CardConto (at withSpinner.js:43)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withSpinner.js:42)
    in withSpinner(CardConto) (created by Connect(withSpinner(CardConto)))
    in Connect(withSpinner(CardConto)) (created by Connect(Connect(withSpinner(CardConto))))
    in Connect(Connect(withSpinner(CardConto))) (at RapportiCarousel.js:69)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at RapportiCarousel.js:68)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at Carousel.js:1178)
    in RCTView (at View.js:45)
    in View (at VirtualizedList.js:1741)
    in CellRenderer (at VirtualizedList.js:688)
    in RCTScrollContentView (at ScrollView.js:953)
    in RCTScrollView (at ScrollView.js:1092)
    in ScrollView (at VirtualizedList.js:1065)
    in VirtualizedList (at FlatList.js:632)
    in FlatList (at createAnimatedComponent.js:151)
    in AnimatedComponent (at Carousel.js:1308)
    in Carousel (at RapportiCarousel.js:121)
    in RCTView (at View.js:45)
    in View (at Tips.js:361)
    in RCTView (at View.js:45)
    in View (at Tips.js:356)
    in Tips (at TipsContainer.js:62)
    in TipsContainer (created by Connect(TipsContainer))
    in Connect(TipsContainer) (at RapportiCarousel.js:115)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at RapportiCarousel.js:114)
    in RapportiCarousel (created by Connect(RapportiCarousel))
    in Connect(RapportiCarousel) (at DashboardScreen.js:176)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at DashboardScreen.js:168)
    in RCTScrollContentView (at ScrollView.js:953)
    in RCTScrollView (at ScrollView.js:1092)
    in ScrollView (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(ScrollView))
    in Styled(ScrollView) (at DashboardScreen.js:156)
    in DashboardScreen (at withPendingRequests.js:62)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withPendingRequests.js:61)
    in withPendingRequests(DashboardScreen) (at withSCA.js:358)
    in withSCA(withPendingRequests(DashboardScreen)) (created by Connect(withSCA(withPendingRequests(DashboardScreen))))
    in Connect(withSCA(withPendingRequests(DashboardScreen))) (created by Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))
    in Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))) (at withPushHandler.js:109)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withPushHandler.js:108)
    in withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))) (created by Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))
    in Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))) (at withSpinner.js:43)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withSpinner.js:42)
    in withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))) (created by Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))))
    in Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))) (created by Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))
    in Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))) (at withTab.js:87)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withTab.js:86)
    in withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))))) (created by Connect(withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))))
    in Connect(withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))) (at ComponentWrapper.js:29)
    in WrappedComponent (at ComponentWrapper.js:45)
    in Provider (at ComponentWrapper.js:44)
    in ReduxWrapper (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)

<unknown>
    Shape.js:9:24
<unknown>
    lodash.js:4911:23
baseForOwn
    lodash.js:2996:31
<unknown>
    lodash.js:4880:26
forEach
    lodash.js:9344:18
Shape
    Shape.js:8:18
Svg
    Svg.js:53:8
constructClassInstance
    ReactNativeRenderer-dev.js:7324:26
updateClassComponent
    ReactNativeRenderer-dev.js:11479:6
performUnitOfWork
    ReactNativeRenderer-dev.js:17276:21
workLoop
    ReactNativeRenderer-dev.js:17316:41
renderRoot
    ReactNativeRenderer-dev.js:17417:15
performWorkOnRoot
    ReactNativeRenderer-dev.js:18423:17
performWork
    ReactNativeRenderer-dev.js:18324:24
performSyncWork
    ReactNativeRenderer-dev.js:18285:14
batchedUpdates$1
    ReactNativeRenderer-dev.js:18531:21
batchedUpdates
    ReactNativeRenderer-dev.js:2611:31
_receiveRootNodeIDEvent
    ReactNativeRenderer-dev.js:2706:17
receiveEvent
    ReactNativeRenderer-dev.js:2726:26
__callFunction
    MessageQueue.js:366:47
<unknown>
    MessageQueue.js:106:26
__guard
    MessageQueue.js:314:10
callFunctionReturnFlushedQueue
    MessageQueue.js:105:17
@vikrantnegi vikrantnegi changed the title Issue with react native 0.59.0 TypeError: method.bind is not a function Issue with react native 0.59.0 Mar 14, 2019
@vikrantnegi

This comment has been minimized.

Copy link
Author

@vikrantnegi vikrantnegi commented Mar 14, 2019

@JesperLekland Please help. Not able to upgrade my app to the newer version.

@marcorm

This comment has been minimized.

Copy link

@marcorm marcorm commented Mar 14, 2019

@vikrantnegi i solved my problem:
I updated to react-native-svg 9.3.3
react-native start --reset-cache and it worked.

@vikrantnegi

This comment has been minimized.

Copy link
Author

@vikrantnegi vikrantnegi commented Mar 15, 2019

@marcorm It didn't solve my problem. I'm still having the issue. Reset cache not working for me.

@marcorm

This comment has been minimized.

Copy link

@marcorm marcorm commented Mar 15, 2019

@vikrantnegi what version of react-native-svg have you installed?
Try the 9.3.3 and let us know...

@vikrantnegi

This comment has been minimized.

Copy link
Author

@vikrantnegi vikrantnegi commented Mar 15, 2019

@marcorm Interesting enough, It is working with the latest version. Thank you so much. I was planning to upgrade my project and this was holding me back.

Do you have info why this was happening in the first place?

@nethergrim

This comment has been minimized.

Copy link

@nethergrim nethergrim commented Mar 28, 2019

Simulator Screen Shot - iPad Air 2 - 2019-03-28 at 13 02 08

react-native 0.59,
react-native-svg: 8.0.10

@vikrantnegi

This comment has been minimized.

Copy link
Author

@vikrantnegi vikrantnegi commented Mar 28, 2019

@nethergrim Try updating the react-native-svg package to the latest version. It solved the problem for me.

@davidcorbin

This comment has been minimized.

Copy link

@davidcorbin davidcorbin commented Apr 4, 2019

Had the same issue and @vikrantnegi fix worked. I updated react-native-svg to 9.3.7

@nysamnang

This comment has been minimized.

Copy link

@nysamnang nysamnang commented May 28, 2019

"react-native": "0.59.8"
"react-native-svg": "9.3.7"
"react-native-svg-charts": "5.0.0"

It works fine for me :)

NOTE with Cocoapods: After upgrade or downgrade react-native-svg you have to update Pod file too, cd ios => pod update.

@ribamarsantos

This comment has been minimized.

Copy link

@ribamarsantos ribamarsantos commented Jun 10, 2019

@marcorm I update to 9.5.1 and worked fine too!
react-native: 0.59.9 here.

@vikrantnegi i solved my problem:
I updated to react-native-svg 9.3.3
react-native start --reset-cache and it worked.

@codesinghanoop

This comment has been minimized.

Copy link

@codesinghanoop codesinghanoop commented Jun 13, 2019

Still facing issue after upgrading react-native-svg version to latest however my react-native version is 0.59.9 Any help would be appreciated.

@jamesmcn1

This comment has been minimized.

Copy link

@jamesmcn1 jamesmcn1 commented Jun 28, 2019

@codesinghanoop I just upgraded to RN 0.59.9 and upgrading to latest version of react-native-svg fixed this issue for me 🤷‍♂
yarn add react-native-svg@latest
yarn start --reset-cache to get new package from bundler

@lakshbhutani

This comment has been minimized.

Copy link

@lakshbhutani lakshbhutani commented Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.