Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView doesn't load local html file correctly #24251

Closed
WebMobi59 opened this issue Apr 2, 2019 · 5 comments
Closed

WebView doesn't load local html file correctly #24251

WebMobi59 opened this issue Apr 2, 2019 · 5 comments
Labels
Bug Component: WebView Related to the WebView component. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@WebMobi59
Copy link

WebMobi59 commented Apr 2, 2019

馃悰 Bug Report

I am using webview to load local html file which shows the variety of tiles on google maps.
it works on native project, but two tiles doesn't load in react native project with same html file.

React Native screenshot.

MqNYQ

Native screenshot.

gDW3M

Expected Behavior

Need to show all tiles correctly like as native.

Code Example

Here is codechip for webview.

<WebView
          originWhitelist={['*']}
          onLoad={this.onLoad}
          source={Platform.OS === 'android' ? { uri: 'file:///android_asset/index.html' } : {uri: './index.html'}}
          dataDetectorTypes={'none'}
          ref='webview'
          onMessage={e => this.onMessage(JSON.parse(e.nativeEvent.data))}
          onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
          onNavigationStateChange={this.onShouldStartLoadWithRequest}
          injectedJavaScript={patchPostMessageJsCode}
          useWebKit={true}
          />

I am not sure why this file doesn't work on react native.
Any help are appreciated.

@react-native-bot react-native-bot added the Component: WebView Related to the WebView component. label Apr 2, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

馃憠 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Apr 2, 2019
@WebMobi59
Copy link
Author

It works on Android correctly, this problem come from only iOS platform

@dulmandakh
Copy link
Contributor

Please use https://github.com/react-native-community/react-native-webview, because WebView in React Native is deprecated and will be removed in the future.

@WebMobi59
Copy link
Author

@dulmandakh, so we can't resolve this issue?
It give me HTTP load failed 999 error when I run project with Xcode

@dulmandakh
Copy link
Contributor

@WebMobi59 WebView in React Native will not receive any updates and will be removed soon. Please use react-native-webview, which is actively maintained fork.

@facebook facebook locked as resolved and limited conversation to collaborators Apr 2, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: WebView Related to the WebView component. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants