react-native-signature-canvas
react-native-signature-canvas copied to clipboard
Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager
Hi,
After Expo CLI update I now get the following red error:
Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager.
I'm using react-native-webview 7.0.1
Any idea how to fix this?
Have the same issue using the latest version of expo sdk;
Edit: Tested using the examples in this project and they didnt work either.
only wait for expo sdk update,you can use [email protected].
[email protected]. or 1.5.1 is not working for me. sdk 35 react-native-webview 7.0.1
"react-native-webview": "^6.9.0",please use this version。
Hi. Im also getting this error using ^6.9.0
Hi. Im also getting this error using ^6.9.0
What's your react-native-signature-canvas version? Please use v1.5.0.
same problem without Expo on using react-native-signature-canvas@^1.6.0 and react-native-webview@^7.5.2: version "7.6.0"
Hi, @torstenloth .
You can try this example. https://github.com/YanYuanFE/react-native-signature-canvas/tree/master/example/exampleApp. this is a latest example of expo.
im getting the same issue as above and not really sure how to fix it:
my package.json contains this:
{
"dependencies": {
"expo": "^36.0.0",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-signature-canvas": "^1.6.0",
"react-native-webview": "7.4.3" // installed a compatible version using expo install react-native-webview
}
}
When you try use both the Signature AND the WebView at the same time (same component) it breaks with the error below:
Hi, @Trashpants. "react-native-signature-canvas" has include "react-native-webview", You don't need extra installation.
Hi @YanYuanFE,
So to give you the example of what Im trying to do - I Have a user read a web page (using a custom WebView Ive made) and then have a modal window where they need to add a signature.
Or to go even simpler I've put together this snack which shows the issue - hopefully it will make more sense with what im trying to do:
https://snack.expo.io/@trashpants/cfc43a
Hi! @Trashpants, this issue caused by the react-native-webview in react-native-signature-canvas package.json version is not matched with your project package.json.
Change your package.json react-native-webivew version to react-native-signature-canvas's react-native-webview version will solve this issue.
Hi @YanYuanFE , I'm trying to run a project with "react-native-webview": "^7.5.2" "react-native-signature-canvas": "^1.5.0" and I'm still getting this error. In addition, I've run your example and it is failing as well.
Hi @aibars , You can try the lastest version of [email protected], and require expo sdk is latest.
https://github.com/YanYuanFE/react-native-signature-canvas/tree/master/example/exampleApp, latest example
This was a linking issue for me. I am not running expo. The issue comes from react-native-webview not being linked to your project properly (if you have not installed it directly in your app), as it gets installed as a dependency via this package.
My solution, as we use pods (in iOS), was to add:
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
to the podfile.
I imagine similar solutions exist for Android and Pure XCode users.
As I'm not a fan of react-native link (it's never really worked for me), I like to do it manually:
- Android: https://engineering.brigad.co/demystifying-react-native-modules-linking-964399ec731b
- iOS: https://facebook.github.io/react-native/docs/linking-libraries-ios
- React-Native-Webview's docs: https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md
Thanks @joshhogg your answer helped me.
Facing the same issue in Android, but ios works after pod install.
"react-native": "0.61.5", "react-native-signature-canvas": "^1.9.0",
I tried react-native-signature-canvas with v1.9.0, v1.8.0, v1.5.1, both fail. I also tried to install the webview in my own project, still fail. I don't use expo, just pure react native project,
Since after rn 0.60, rn will auto-link the packages for Android. We suppose no need to link by ourselves.
If I manully link the webview followed @joshhogg suggestions, the build is fail due to error:
react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses or overrides a deprecated API.
Thanks in advance.
I think it may be a bug in react-native-webview, and it doesn't work when I only use react-native-webview。
Hi, @nengliangZ , You can only use react-native-webview for this example: import React, { Component } from 'react'; import { WebView } from 'react-native-webview';
class MyWeb extends Component { render() { return ( <WebView source={{ uri: 'https://infinite.red' }} style={{ marginTop: 20 }} /> ); } }
yarn add react-native-webview will solve the problem
Still getting this issue on Expo 36, but only on iOS signature-canvas: "^1.9.0"
you can try to use the latest version: v2.6.0.
I had the latest version originally and that didn't work either. It does seem to have magically fixed itself now though, without me changing anything
OK, Good.
same error here :( "react-native-signature-canvas": "^3.0.0", "react-native-webview": "^10.3.2",
Hey @erikhu I solved doing this:
I run yarn add react-native-webview
then pod install
apparently, the webview that comes within react-native-signature-canvas doesn't link with pod install.
my project:
"react-native": "0.63.0",
"react-native-signature-canvas": "^3.0.0",
I'm hitting this error with near latest and I fixed it by install react-native-webview
manually which seems to have fixed a dependency linking problem on android
"react-native": "0.63.1",
"react-native-signature-canvas": "^3.1.0",
// installed this after experiencing the problem
"react-native-webview": "^11.0.0",
i have the same error "react-native": "^0.59.5",
"react-native-signature-canvas": "^3.3.0", "react-native-webview": "^11.0.2",
@Guilleanto , try "react-native-webview": "^10.9.0"