jarden-digital / react-native-recaptchav3

Haskkor/react-native-recaptchav3
MIT License
48 stars 77 forks source link

Tried to register two views with the same name RNCWebView #9

Closed agarwalnitesh closed 4 years ago

agarwalnitesh commented 4 years ago

Issue Description I'm already depending on react-native-webview and when I add @haskkor/react-native-recaptchav3 I'm getting this error: Tried to register two views with the same name RNCWebView

  1. I already try to match the version of react-native-webview in my project package.json and package.json of @haskkor/react-native-recaptchav3 but it didn't work

MyProjectPackage.json { "dependencies": { "react-native-webview": "9.0.1", "@haskkor/react-native-recaptchav3": "1.2.0", } } and @haskkor/react-native-recaptchav3 package.json

{ "dependencies": { "react-native-webview": "9.0.1", } }

  1. I had also try npm cache clean --force and rm -rf node_modules && npm install but didn't get any success.

Please suggest Any fix!!

agarwalnitesh commented 4 years ago

I can fix this issue by removing react-native-webview from package.json dependencies of @haskkor/react-native-recaptchav3.

But stuck in other issue where I'm unable to get the token:

  1. Nothing happens in Automatically get a captcha token
  2. Getting undefined when using this._captchaRef.refreshToken()
Vednus commented 4 years ago

I don't think removing the dependency from this package is the best method. Could we upgrade the dependency to 10?

amitmehtacode commented 6 months ago

This issue is because this library itself has a dependency on react-native-webview version 9.0.1. I have fixed this issue by updating react-native-webview to version 11.18.1.