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

[Bug] [Android] "Error -6 No network connection available" when connected to a wifi without internet #486

Open
ErwanLGZ29 opened this issue Nov 22, 2022 · 3 comments

Comments

@ErwanLGZ29
Copy link

I am using an Redmi 10c android 12 smartphone that does not have a 4g connection. It is connected to a private wifi that doesn't have internet either and I try to make an http request on a route from a local server, the request does not work and returns an error -6, "No network connection available". The smartphone is connected to the server's wifi and the route is available.

I created a fork of this plugin by commenting the verification on 'isNetWorkAvailable' and I could communicate in http to my local server in wifi without any problem :
https://github.com/ErwanLGZ29/cordova-plugin-advanced-http/blob/master/src/android/com/silkimen/cordovahttp/CordovaHttpPlugin.java

@davidanquetin
Copy link

Thanks, same problem here, i will test your fork !

@digaus
Copy link

digaus commented Nov 29, 2022

Same issue here when trying to communicate with smart home devices which have not internet...

@silkimen
Copy link
Owner

Would you please propose an option for disabling this feature and create a PR?
e.g.

I would actually prefer second option but open for comments and discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants