xuho / react-native-google-recaptcha-v2

Implement Google recaptcha v2 in React Native (both Android an iOS)
MIT License
38 stars 39 forks source link

Problem rendering captcha component #6

Closed rherrerag closed 4 years ago

rherrerag commented 4 years ago

Hi there,

I'm having an issue whenever I try to render the captcha component. I don't know what is it. I'm using React Native 0.59.0

Thanks and regards.

Here is the error it returns:

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `GoogleReCaptcha`.

This error is located at:
    in GoogleReCaptcha (at react-native-google-recaptcha-v2/index.js:35)
    in RCTView (at View.js:45)
    in View (at react-native-google-recaptcha-v2/index.js:34)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at createAnimatableComponent.js:599)
    in withAnimatable(View) (at src/index.js:579)
    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 Modal.js:244)
    in RCTView (at View.js:45)
    in View (at Modal.js:264)
    in RCTModalHostView (at Modal.js:252)
    in Modal (at src/index.js:625)
    in ReactNativeModal (at react-native-google-recaptcha-v2/index.js:25)
    in ConfirmGoogleCaptcha (at Destinatarios.js:550)
    in RCTView (at View.js:45)
    in View (at Card.js:21)
    in Card (at connectStyle.js:392)
    in Styled(Card) (at Destinatarios.js:506)
    in RCTScrollContentView (at ScrollView.js:976)
    in RCTScrollView (at ScrollView.js:1115)
    in ScrollView (at Content.js:48)
    in RCTView (at View.js:45)
    in View (at KeyboardAvoidingView.js:200)
    in KeyboardAvoidingView (at Content.js:42)
    in ContentBCH
    in ContentBCH (at Destinatarios.js:505)
    in RCTView (at View.js:45)
    in View (at Container.js:12)
    in Container (at connectStyle.js:392)
    in Styled(Container) (at Destinatarios.js:504)
    in AgregarDestinatario (created by Context.Consumer)
    in Connect(Component) (created by SceneView)
    in SceneView (at StackViewLayout.js:793)
    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:71)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:858)
    in RCTView (at View.js:45)
    in View (at screens.native.js:101)
    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 Handler (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:793)
    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:71)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:858)
    in RCTView (at View.js:45)
    in View (at screens.native.js:101)
    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 Handler (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 createTabNavigator.js:39)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:37)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:26)
    in ResourceSavingScene (at createBottomTabNavigator.js:113)
    in RCTView (at View.js:45)
    in View (at screens.native.js:101)
    in ScreenContainer (at createBottomTabNavigator.js:103)
    in RCTView (at View.js:45)
    in View (at createBottomTabNavigator.js:102)
    in TabNavigationView (at createTabNavigator.js:197)
    in NavigationView (created by Navigator)
    in Navigator (at appNavigator.js:102)
    in AppNavigator (created by SceneView)
    in SceneView (created by SwitchView)
    in SwitchView (created by Navigator)
    in Navigator (at createAppContainer.js:388)
    in NavigationContainer (at App.js:38)
    in StyleProvider (at App.js:37)
    in RCTView (at View.js:45)
    in View (at Root.js:14)
    in Root (at connectStyle.js:392)
    in Styled(Root) (at App.js:36)
    in Provider (at App.js:35)
    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)

createFiberFromTypeAndProps
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:15064:17
createFiberFromElement
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:15084:21
reconcileSingleElement
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:17193:29
reconcileChildFibers
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:17240:41
reconcileChildren
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:18772:34
mountIndeterminateComponent
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:19312:11
beginWork
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:19767:22
performUnitOfWork
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:23173:18
workLoop
    7f3b9650-66a5-4553-a7e0-38e8a8b0ac56:23207:30
xuho commented 4 years ago

Did you installed react-native-modal and react-native-webview dependencies?

rherrerag commented 4 years ago

Hi, I had an old version of webview in my project. I updated the lib and linked manually on XCode to fix it. It works fine now. Thanks a lot.