question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webview not loading requested site

See original GitHub issue

Bug description:

React-native-webview does not open requested page. It loads the webview. OnLoadStart and onLoadEnd are triggered but webview does not show anything.

I created a test app in Expo snack. Added just react-native-webview. Tried on Expo 33 and Expo 34. Both give same result.

App.js

import * as React from "react";
import { View } from "react-native";
import RNWebView from "react-native-webview";

export default class App extends React.Component {
  render() {
    return (
      <View style={{ flex: 1, backgroundColor: "red", padding: 10 }}>
        <RNWebView
          style={{ flex: 1 }}
          source={{ uri: "www.google.com" }}
          onLoadEnd={() => console.log("OnLoadEnd")}
          onLoadStart={() => console.log("OnLoadStart")}
          onError={err => console.log({ err })}
        />
      </View>
    );
  }
}

package.json dependencies

"dependencies": {
   "expo": "^33.0.0",
   "react": "16.8.3",
   "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
   "react-native-paper": "2.16.0",
   "react-native-webview": "^6.9.0"
 }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
tafkanatorcommented, Aug 12, 2019

if you change url to include protocol (https://) then it loads. Weird thing with this example is that no error is given and form my experience i sometimes get same result even if protocol is included.

0reactions
github-actions[bot]commented, Oct 30, 2019

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android WebView not loading URL - Stack Overflow
In shouldOverrideUrlLoading() method, do not call WebView#loadUrl(String) with the request's URL and then return true. This unnecessarily ...
Read more >
UWP Webview doesn't load website - Microsoft Q&A
Hello, Welcome to Microsoft Q&A! UWP Webview doesn't load website. Your page looks WebGL page. WP WebView control is support WebGL.
Read more >
WebView - React Native
never (default) - WebView will not allow a secure origin to load content from an insecure origin. always - WebView will allow a...
Read more >
Cannot load additional resources for HTML page ... - GitHub
Bug description: I'm attempting to load a local website which has been ... assets being requested by the webview through that static server....
Read more >
IWebView | 3D WebView Documentation
IWebView is the primary interface for loading and interacting with web content. It contains methods and properties for common browser-related functionality, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found