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.

Android - net::ERR_NAME_NOT_RESOLVED

See original GitHub issue

Bug description:

When trying the example of usage Android returns an error Encountered an error loading page {"canGoBack": false, "canGoForward": false, "code": -2, "description": "net::ERR_NAME_NOT_RESOLVED", "loading": false, "target": 855, "title": "Webpage not available", "url": "https://reactnative.dev/"} Searching on Google i saw something about AppRegistry if this screen its going to be my root page, but is not my case, and trying on iOS everything is working just fine

To Reproduce:

Try the example of usage in a functional component

import React, {useRef, useState} from 'react';
import {SafeAreaView} from 'react-native';
// More imports

const HomeScreen = () => {
  // More stuff
  return (
    <SafeAreaView>
      <WebView source={{uri: 'https://reactnative.dev/'}} />
    </SafeAreaView>
  );
};

Expected behavior:

Screenshots/Videos:

iOS (working) Simulator Screen Shot - iPhone 11 - 2020-09-07 at 13 31 35

Android (not working) Screenshot_1599503315

Environment:

  • OS: macOS
  • OS version: 10.15.6
  • react-native version: 0.61.5
  • react-native-webview version: 10.8.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:31

github_iconTop GitHub Comments

19reactions
lklepnercommented, Oct 22, 2020

I’m experiencing this problem as well.

5reactions
milesibastoscommented, Nov 13, 2020

The emulator has no access to internet, so try it:

emulator -avd Nexus_5_API_28 -dns-server 8.8.8.8

related thread: https://stackoverflow.com/questions/42736038/android-emulator-not-able-to-access-the-internet

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix an Error ERR_NAME_NOT_RESOLVED on ...
How to Fix ERR_NAME_NOT_RESOLVED on Android? · Solution 1: Change the DNS Server Settings for Your Internet Connection · Solution 2: Try to...
Read more >
ERR_NAME_NOT_RESOLVED: 6 Proven Methods to Fix It
The ERR_NAME_NOT_RESOLVED error happens simply because the system can't find the correct IP address or the computer is storing old and outdated information....
Read more >
How to solve err_name_not_resolved - SupportHost
How to fix err_name_not_resolved · Check the address · Check the connection · Clear cookies and cache · Disable the browser preload feature...
Read more >
How to Fix an Error ERR_NAME_NOT_RESOLVED ... - Xeonbit
Xeonbit.com: How to Fix an Error ERR_NAME_NOT_RESOLVED on Android Devices? · Go to menu Settings > Wi-Fi; · Long press your Wi-Fi network...
Read more >
ERR_NAME_NOT_RESOLVED - How to Fix on Android, iOS ...
ERR_NAME_NOT_RESOLVED – How to Fix on Android, iOS, Windows · 1. Ensure you have Internet connectivity (very common cause of the error) ·...
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