Bug description:
The Expo Supported version of this package 11.23.1 is throwing an error and not moving past the splash screen. This started happening after upgrading from Expo SDK 45 to Expo SDK 47. on EAS Android Build.
This module works just fine in Expo Go but when I load my app in the actual Android build I get the error below:
TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNCWebView.isFileUploadSupported')
To Reproduce:
Step 1: Run npx create-expo-app my-app and cd my-app (sdk 47)
Step 2: Install react-native-webview npx expo install react-native-webview. Yarn is used as the package manager.
Step 2: Add WebView like the example below to the main App.js file:
import * as React from 'react';
import { WebView } from 'react-native-webview';
export default function App() {
return (
<WebView
style={{width: 100, height: 100}}
source={{ uri: 'https://expo.dev' }}
/>
);
}
Step 3: Create EAS Android (I recommend using the following in your EAS profile: { "developmentClient": true, "distribution": "internal" }. This will make it easier to see the error message.)
Step 4: (If using developmentClient build) Start expo locally npx expo start and open in Android Build. (NOTE: react-native-webview works fine in Expo Go, it only throws the error when loading it in an actual build.)
Expected behavior:
App should load past the splash screen.
Screenshots/Videos:
The following error happened after loading my app in the Android Build
Environment:
- OS: Mac
- OS version: 12.5
- react-native version: 0.70.5
- react-native-webview version: 11.23.1
- Expo CLI Version: 0.4.11
- EAS CLI Version: 3.2.1
- Node Version: 14.21.0
- Yarn Version: 1.22.19
I tried to use react-native-webview inside of an Expo EAS Android Build using Expo SDK 47. I expected for the app to load just fine like the previous version of my app built with Expo SDK 45 and Expo Build:Android. Currently it's not moving past the splash screen and is throwing the following error:
TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNCWebView.isFileUploadSupported')