Skip to main content

Questions tagged [react-native-webview]

The tag has no usage guidance.

react-native-webview
Filter by
Sorted by
Tagged with
31 votes
8 answers
32k views

crypto.getRandomValues() not supported

I'm getting this error with npm [email protected] when I try to generate a QR code with react-native-qrcode-generator I'm using react-native with an expo managed workflow. And the thing is ...
jsnid00's user avatar
  • 646
27 votes
3 answers
16k views

react-native-webview : For iOS text too small

I have used react-native-webview for rendering HTML text. But text is too small in iOS while in android it is perfect. Here are lines of code : import { WebView } from "react-native-webview"; ...
Payal Maniyar's user avatar
25 votes
15 answers
67k views

Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager

Hello friends i got this error after linking react-native-webview to my project Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager. This error is located at:...
Sky Sakthi's user avatar
16 votes
2 answers
41k views

How to use PostMessage in a React Native webview?

I'm trying to use the postmessage to a page opened in a webview inside a React Native App. I tried many times, but still wasn't able to send it. I can listen to messages from the webpage normally. I ...
Felipe César's user avatar
12 votes
7 answers
26k views

Execution failed for task ':react-native-webview:compileDebugKotlin'

After upgrading react native from 0.61.2 to 0.68.2 with RN update helper, gradle cant build app. Getting this error FAILURE: Build failed with an exception. What went wrong: Execution failed for task ...
Vl Hayrapetyan's user avatar
12 votes
1 answer
15k views

How to keep last web session active in react-native-webview?

I am working on one app, In which I need to keep users last web-session active in react-native-webview. Here is a required work-flow. My app is only have one WebView, Where there is fixed url is ...
Vishal Sharma's user avatar
10 votes
4 answers
28k views

React Native WebView for Android not displaying PDF and Word files

I am developing a new project about publishing Personal CV. I need to show users' CVs in the application. My standard WebView code is below and working well on iOS. import * as React from 'react'; ...
Hasan Rıza Uzuner's user avatar
10 votes
3 answers
7k views

React Native - Null pointer dereference after navigating to/from a page containing multiple tweets embedded inside their own WebViews

The app I'm currently building for work is mainly focused around displaying articles. Some of them contain Twitter embeds (on the web version) and since the API is shared by both of our apps I also ...
emeraldsanto's user avatar
  • 4,671
10 votes
2 answers
10k views

React Native WebView App not exit on pressing back button

React Native WebView App not exit on pressing back button after setting Go back functionality on back button pressed. I want go back functionality on pressing back button when webview is not on home ...
beginner's user avatar
  • 341
10 votes
2 answers
19k views

How can get cookie which is set in webview in react-native?

I am trying to retrieve user entered zipcode which is added to the cookie in the webview. How do I get it? I have tried react-native-cookies which is getting an empty object. import CookieManager ...
Subhendu Kundu's user avatar
8 votes
7 answers
15k views

react-native-webview crashes application when invoked

I am using react-native-webview library to load webpage, it works fine in debuging, but when I create release build. And click on the tab to load webview , application crashes. following is the error. ...
Muhammad Ehtesham Anwar's user avatar
8 votes
5 answers
15k views

How can I send a message from the WebView to React Native?

I’ve successfully managed to send a message from React Native (RN) to a WebView. What I’m struggling with, is getting the message back from the WebView to RN. There’s no errors showing - it’s just ...
MoO's user avatar
  • 145
8 votes
1 answer
8k views

react-native-webview load a local HTML file but got plain text

I try to load a HTML file depends on someother .js file. So I write code like this, but got plain text in webview. render = () => { let source; if (__DEV__) { source = require('./...
Desmond Chen's user avatar
6 votes
3 answers
16k views

How to make WebView scrollable in react-native-webview?

I have <WebView> that is embedded in a <Card.Content> as I am using react-native-paper. I am trying to have WebView scrollable. The webview shows but not scrollable. Code I am using: <...
0x01Brain's user avatar
  • 818
6 votes
5 answers
3k views

HTML input type="file" not working to pull up camera for Pixel / android 14 combination

I posted this in the react-native-webview discussion thread in GitHub in case this is something they need to add support for, but wanted to see if anyone had any thoughts here: Disclaimer: I'm a web ...
ScalableDale's user avatar
6 votes
3 answers
10k views

React Native Webview social authentication

I am trying to build an iOs mobile application for a website with webview in React Native. I am using the library ('react-native-webview') in the expo-cli project. Everything seems so good so far. And ...
Falay's user avatar
  • 63
6 votes
2 answers
2k views

Is there any way to disable hapticFeedback in react-native-webview

<ScrollView ref={scrollRef} horizontal scrollEnabled={isScroll} contentContainerStyle={{height: HEIGHT, overflow: 'hidden'}} style={{ width: metrics....
Harish Jangra's user avatar
6 votes
2 answers
8k views

How to set custom fonts in WebView(react-native-webview) in iOS?

I want to set custom fonts in Webview. I have implemented the below code: @font-face { font-family: 'Poppins-Bold'; src:url('file:///android_asset/fonts/Poppins-Bold.ttf') format('truetype') ...
ME-DEV's user avatar
  • 627
6 votes
2 answers
3k views

react-native : Get internal api call data from url of the WebView

I have a webview with a url (for example a payment processing page). When the url is loaded, certain api calls are done and i want to know how to get data from the internal api calls of that ...
FortuneCookie's user avatar
6 votes
2 answers
5k views

React Native display PDF in Android web view

I have a React Native app in which at some page I've got a web view (react-native-webview) for displaying PDFs from our server. In iOS everything works fine, in Android, whenever I try to view the ...
Can Poyrazoğlu's user avatar
6 votes
1 answer
2k views

TypeError: Cannot read property 'isFileUploadSupported' of null

I am trying to render a HTML snippet in my React-Native app using react-native-webview , I also tried react-native-render-html, but in this CSS is not work that much. This is my Error Stack ERROR ...
Saurabh D Vyas's user avatar
6 votes
1 answer
2k views

Loading bundled static assets in React Native WebView

I have a React Native project where I'm trying to bundle some pre-generated HTML, JS, and CSS with the application, and have a WebView render the web assets using the react-native-community/react-...
Payton Yao's user avatar
5 votes
2 answers
15k views

Want to clear cache from webView in React Native CookieManager.clearAll(); Not Working in iOS

Want to clear cache from Reaact-native-webView in React Native, {CookieManager.clearAll();}-Not Working in iOS
arun alexander's user avatar
5 votes
1 answer
18k views

How can I get cookies from react native webView on iOS?

I have a Single-Sign-On site opened in a webView. After the user logs in I need to take a cookie to request a token from the API and use it in the application for all the other requests. This all ...
rebelok's user avatar
  • 88
5 votes
1 answer
5k views

The method stopLoading of react-native-webview causes the website to freeze

I want to intercept clicks on a link in my webview in react-native and perform a custom action instead of navigating to the target of the link as described in the official guide. Here's what I do: ...
Fencer's user avatar
  • 1,038
5 votes
3 answers
5k views

How to inject React Component inside WebView (react-native-webview)?

Is there a way to pass in a web React component to WebView directly? Something like this- import ReactContainer from 'somewhere'; import { WebView } from "react-native-webview"; <WebView ...
Prakul Gupta's user avatar
5 votes
4 answers
12k views

React Native problem: WebView has been removed from React Native

I built new React Native project yesterday using react-native-cli. But when running the project with my android phone, I got this error in red screen. Invariant Violation: WebView has been removed ...
Andrew Terex's user avatar
5 votes
2 answers
6k views

Webview not appearing in Expo Web

Working fine in expo mobile app, but same code doesn't show anything when opening Expo App on Web browser by running command expo start --web Here is the sample code <WebView ...
haseem's user avatar
  • 51
5 votes
1 answer
2k views

How change font-family (font-family.ttf from assets) of react-native webview

I am using react-native webview to display some web content in my react-native app. and my app font-family and webview font-family is different. I want to change webview font-family from app. Is there ...
jamal's user avatar
  • 1,077
5 votes
3 answers
2k views

Package react-native-webview has been ignored because it contains invalid configuration

here is the version Old Version => "react-native-webview": "^11.17.2", New Version => "react-native-webview": "^11.18.0" I am using webview to render ...
Shafqat Bari's user avatar
5 votes
2 answers
7k views

How to make React Native Webview auto height

I need to render some HTML code in my React Native app. But it seems like the WebView can't be set to auto height. Please help me with this problem. This is my code. <View style={{ ...
Manas Sanas's user avatar
5 votes
1 answer
3k views

What is the difference between incognito and cacheEnabled props in React Native WebView?

First of all, I have a basic level of English so I hope that you understand. What is the difference between incognito and cacheEnabled props in React Native WebView? react-native-webview doc don't ...
pedrohpinho's user avatar
5 votes
0 answers
385 views

How to Specify version of WebView Implementation to be used in Android App? Is there a way to package a version of "Android System WebView" in APK

We have an Android Application built in React Native platform which loads a Web URL into a WebView. It imports the WebView component from the react-native-webview package. During runtime, we see that ...
mrchidam's user avatar
  • 234
5 votes
0 answers
298 views

Detect href link click in react native webview

<WebView bounces={false} showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} javaScriptEnabled={true} originWhitelist={['*']} source={{ uri:"...
Rambler's user avatar
  • 277
5 votes
0 answers
81 views

Render screen after JavaScript has been injected in React Native WebView

I'm using the injectedJavaScript prop with a React Native WebView. Currently, my screen is rendered, then the JavaScript is injected, then the screen is re-rendered. Is there a way to render my ...
Ali's user avatar
  • 504
5 votes
0 answers
3k views

How to listen a click event triggered inside webapp on react-native webview

I want to listen a click event triggered inside a webapp , this webapp loads in react-native webview. So need to listen the click event and then run an async function in react-native. My use-case is ...
Vasant's user avatar
  • 121
5 votes
0 answers
691 views

How can i prevent the default selection tooltip in react-native-webview

Basic description I'm rendering an epub file in the webview and i want to the user can't be able to copy a text but i want to let him select the text for some reasons (Highlight and some stuff) . ...
Mahdi's user avatar
  • 1,405
4 votes
2 answers
15k views

react-native-webview why is the goBack() method not working?

I have a simple React Native project in Expo, it launches a website using react-native-webview. Here is the source code: import React from "react"; import { StyleSheet, View, SafeAreaView } ...
Gary's user avatar
  • 1,096
4 votes
1 answer
11k views

React Native WebView with local javascript

I'm going to create a React Native app with WebView. This View must contain local HTML and Javascript files. This is the code. ---> WVView.js ... render(){ return ( <View ...
zp26's user avatar
  • 1,527
4 votes
3 answers
3k views

react-native-webview Typescript error: 'WebView' cannot be used as a JSX component

I am trying to set up a simple React Native app using Expo with TypeScript that shows a WebView. My App.tsx file contains the following: import Constants from 'expo-constants'; import { StyleSheet } ...
Julian Lachniet's user avatar
4 votes
1 answer
1k views

React-Native, Stripe card element not displaying for live API key

In my react-native project i have used react-native-webview and stripe js (https://js.stripe.com/v3) Using stripe js i am creating card element to collect card details var elements = stripe.elements() ...
nitheeshsalian's user avatar
4 votes
1 answer
7k views

React-native-webview: net::ERR_FAILED

Bug description: The first time I open my app the website loads correctly in the WebView. Then I go to the homescreen and after a while I return to the app and gets the following error: Website not ...
Steffen Christensen's user avatar
4 votes
2 answers
20k views

react-native-webview how to inject javascript?

On Android, I had been using expo-stripe-checkout for payments on an Expo managed app. Everything was working fine until I updated to the newest version of expo and react-native. Now, none of the ...
gwalshington's user avatar
  • 1,446
4 votes
0 answers
219 views

Reader View React-Native-Webview

How can I force the react-native-webview to render the safari reader view by default on this package: https://github.com/react-native-webview/react-native-webview?
derekbailinkedin's user avatar
4 votes
1 answer
569 views

ReactNative Webview - a way to control keyboard settings(auto-correct/capitalize) for a webview/whole app?

I have a webview (using react-native-webview) which has a small text input form. I would like to disable auto-capitalization and auto-correct on the keyboard which pops up when the input form fields ...
elstere's user avatar
  • 109
4 votes
0 answers
430 views

can not install react-native-webiew pods in react-native-tvos targated app

Version: "react-native": "npm:[email protected]", When I want to use some library that is supported by iOS but not tvOS, for example react-native-webview, it gives error ...
D. vekariya's user avatar
4 votes
2 answers
2k views

how to Communicate between react-native webView and a React web-app?

i'm trying to create a communication between a webView in react-native and a web-app created with React-360 (and of course React). I'm using the react-native-webview and I follow this guide at this ...
Giuseppe Pennisi's user avatar
4 votes
1 answer
984 views

Automatically Authenticate with Web Application from React Native webView

I'm building an app using react native , in that app I want to access web application using react-native-webview. Each time requires sign in to log in to web application. For authentication im using ...
reckinam deva's user avatar
4 votes
2 answers
3k views

WebView (react-native-webview) getting error code -1 in Expo SDK36

My Expo App's WebViewScreen Code: import React from 'react'; import { WebView } from 'react-native-webview'; export default WebViewScreen = () => ( <WebView originWhitelist={['*']} ...
FAQi's user avatar
  • 935
4 votes
0 answers
796 views

Is it good to use WebViews in React Native from Security Perspective?

I was going through this link and they mentioned that: In a WebView, any malicious code in the page has the same rights as the application. This means you need to make sure to only load trusted ...
gbhati's user avatar
  • 543

1
2 3 4 5
9