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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PingUtil_Message_HostErrorUnknown #56

Closed
kitchanismo opened this issue Jul 29, 2020 · 3 comments
Closed

PingUtil_Message_HostErrorUnknown #56

kitchanismo opened this issue Jul 29, 2020 · 3 comments

Comments

@kitchanismo
Copy link

kitchanismo commented Jul 29, 2020

// google IP 172.217.24.46
// version 1.2.4
//
// "react": "16.13.1",
// "react-native": "0.63.0",
try {
const ms = await Ping.start('172.217.24.46', {timeout: 1000});
console.log(ms);
} catch (error) {
console.log('special code', error.code, error.message);
}

@micbaumr
Copy link

Same here. Does not work on android 10 when network type is 'cellular'. When network type is 'wifi' ping works fine. Any solutions?

@RoJoHub
Copy link
Owner

RoJoHub commented Aug 31, 2020

172.217.24.46

sorry , ip (172.217.24.46) is fail?

@RoJoHub
Copy link
Owner

RoJoHub commented Aug 31, 2020

Same here. Does not work on android 10 when network type is 'cellular'. When network type is 'wifi' ping works fine. Any solutions?

Here are a few possible explanations。

  1. Maybe you have a permission problem?
    please add this code to AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  1. react-native must be connected to wifi in debug mode, not a module issue

@RoJoHub RoJoHub closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants