Error showing while connecting to localhost - android

While trying to connect to the localhost, an error is showing. Please find the error below
BasicNetwork.performRequest: Unexpected response code 404 for http://10.10.14.120:8080/rest/ws/profile_request

Please check the connection like http://10.10.14.120:8080/rest/, if get anything displays on the page your connection is good. then the problem is with your parameters

some time due to anti virus and firewall can causes this problem. So disable your anti virus and firewall it can solve your problem.
Also make sure http://10.10.14.120:8080/rest/ is working in your mobile browser as well

Related

Firebase Analytics - firebase-core:9.0.0 - FirebaseInstanceId: background sync failed: INVALID_SENDER

I followed the instructions on the following page: https://firebase.google.com/docs/android/setup#add_firebase_to_your_app
The initialization process works fine but I see the error message like mentioned in the title.
Do you know what to do?
After re downloading the google-services.json the message disappeared...
Now I get "FirebaseInstanceId: topic sync succeeded".
Thank you anyway. Maybe this will help someone.
You can safely ignore this working. Its overactive logging when the device is offline or fails to reach the server.
For me, this happened when the emulator I was debugging on had no internet connection. This can happen if you change the internet settings within the emulator - it seems like the emulator may require a restart to make the internet connection work again even if you re-enable it in the emulator settings.
To get rid of the error - change the emulator settings to enable the internet then restart the emulator.
Make sure you project_number in your google-services.json matches the one in your Firebase Console.

Access to localhost (10.0.2.2) Not Found

I saw a tutorial and It was fine until the guy did some wierd thing I couldn't find a way to do it to get my project running.
he could type 10.0.2.2 in the url bar of emulator and get to localhost page of wampserver
so I tried it but at first I had permission denied error and I fixed it, now when I type http://10.0.2.2 I get "Not Found The requested URL / was not found on this server".
thanks for your help !
UPDATE: Even when I try 127.0.0.1 in my computer it gives the same error
PS : http://10.0.2.2 is not a private adress, it stands for localhost in android emulator. in fact it gives me wampserver error so it's accessing localhost, I just need to get rid of the error.
Thank you all !
If you want localhost, write http://localhost or http://127.0.0.1 into your webbrowser.
As #vcsjones pointed out in comments, the address you're talking about might be a private IP of his workstation.

Android Unknown Host Exception (DNS Problem) !

i'm trying to connect to the server from my android device in order to get XML inputStream to do that i'm using XmlPullParser
my server Url is:
http://www.biat.com.tn
so, when i'm trying to get the inputstream from this url, I'm getting an unknown host Exception, the screen become black... (although it works for me in localhost)
Then, to check my config I tried to ping the server from the ADB shell, but there is no connection established !!!
I check an other server (http://www.topnet.tn), but i faced the same problem.
PS : I'm getting Streams from these URLs in Navigator
I think that .TN (Tunisia) domain name are not known by Android devices !!!!
i googled this problem and I found a solution, that i should lauch my application in -dns-server mode with putting 8.8.8.8 as dns server... so it works
but pinging my URL server does not !!! please any one can understand this problem !!!
please help...
How are you loading the data? URLConnection, HttpClient?
http://www.biat.com.tn does http 302 redirect to http://www.biat.com.tn/biat/.
In most cases you will need to handle redirect in your code.

UnknownHostException in android

When i run my application for
sometime, suddenly the network is getting disconnected and i am
getting the unknownhostexception in my application. In that case if i
check the browser, the same exception occurs.I don't know why internet
is getting disconnected suddenly. It works fine only if i re start the
emulator again. If any one knows and provides the solution, it will
be very much helpful for everyone.
See the below link:
http://hubpages.com/hub/Tips-to-solve-the-UnknownHostException-on-Android
Delete the old emulator and create a new one.
This will help

Network Connection

I am trying to call a webservice from an android app (Testing from an Emulator)
Now, i keep on getting "request time failed : java.net.SocketConnection : Address family not supported by protocol"
So, went to 'Browser' app of Android-Emulator and wasn't able to open any website
Also, then wrote a java code (J2SE) for network connection and got a "java.net.ConnectException: Connection timed out: connect"
Then looked here and there and guys had a say that some setting are to be done in eclipse and android-emulator to get the network connection going
Like in one of messages here --> "http://192.9.162.102/thread.jspa?messageID=10631928"
But how and where is what i am looking for ?
Any suggestions ?
Thanks
Yogurt
put this line<uses-permission android:name="android.permission.INTERNET"></uses-permission> in Manifest.xml file. I think it will work for u.

Categories

Resources