In my Android application I use my Rest API, delivered via the cloudflare network (with active proxy). Very often the first connection to the okhttp API receives the following error:
Non-fatal Exception: java.net.UnknownHostException
Unable to resolve host "mydomain.com": No address associated with hostname
After the user retries one or more times, subsequent connections are successful. If there is some downtime with API requests, the error is likely to occur again.
I cannot understand what causes this problem. If it can depend on cloudflare or if there is a way to solve on the okhttp side.
do you have any ideas?
I had the same problem with one of my crypto wallets only to discover my app needed to be updated and once I updated the app everything was smooth from that point on. When I first went to the Play Store to see if I had any updates due, there were none but when I searched specifically for my wallet app in the Play store an update was needed. So make sure you search for the specific app that is giving you the problem in the Play store.
Or you have no internet on the device
or you forgot to add
<uses-permission android:name="android.permission.INTERNET" />
permission in manifest.xml
#see this thread
I have also the same issue but after restarting android studio it solved my problem.
Related
When I post a form with an image taken from my phone I reserve the error "413 request entity too large" I realize that an image included in the form taken by the phone camera is too large, and the server rejects the request... but how can I fix this issue, I'm using Java Spring framework, and MySQL database, all of this handled with Amazon aws services.
You have to modify your .platform as shown in the docs.
For example, you could have the following .platform/nginx/conf.d/myconfig.conf with content:
client_max_body_size 20M;
I struggled with this for so long until I came across this post:
https://medium.com/#robin.srimal/how-to-fix-a-413-request-entity-too-large-error-on-aws-elastic-beanstalk-ac2bb15f244d
Couple things to watch out for here, if your server is restarted or you deploy a new version etc, then your nginx server will also reset and you will need to perform these changes again. Also periodically, AWS seems to reset your EC2 instance address, not sure why, but you need to perform these changes again afterwards. There must be a way of making these changes permanent but I haven't figured that part out yet.
I find the solution thanks for helping...
1-I connect to my EC2 instance throw the "connect" button, a terminal appears.
2-I edit this file: etc/nginx/nginx.conf
3- Add this line:client_max_body_size 10M;
and it works fine.
thank you all ;
I have an android application where I send http requests to an api via Retrofit2/OkHttp. Everything was working fine for 2 weeks. 2 days ago my site was suspended. It reopened today.Error messages started to appear from some users. Users say "Unable to login to the application!". When I checked the logs, I saw something like this ;
I/okhttp.OkHttpClient: <-- HTTP FAILED: java.net.UnknownHostException: Unable to
resolve host "mywebsite.com": No address associated with hostname
Some users are still able to login to the application.I can't make sense of this.
How can I fix this immediately?
Sounds like your mywebsite.com DNS has just not been propagated out fully yet. Check with your hosting service on how long that can take.
For instance, this is what one web hosting service says about it:
https://www.hostgator.com/help/article/when-will-my-domain-start-working-propagation
I've integrated Google inApp billing in my android App. It was working fine, But now I noticed that on one device its always returning BILLING_RESPONSE_RESULT_ERROR response. In Logcat it shows following error.
BillingClient: getSkuDetails() failed. Response code: 6
I couldn't find any help regarding this issue, Can someone help me what could be the possible problems and solution. Thanks.
This generally happens when you have signed out from Google account in your device. All you need to do is just sign in again, if needed do a full restart.
Well, my situation is the connection between my device and google's servers is unstable.Try to open the GooglePlay,and check if the connection is healthy.And it wroks.
In my case, this happened when a new app I submitted was in "Draft" status, not yet approved by Google. Just wait until it's approved and payments will start to work.
An alternative would be to submit it in the internal track and add the email for you play account as a test user.
We are current hosting a Java/Spring server including firebase ID token verification on SAP Cloud Platforms (Hana Cloud). The authentication worked fine for the last few month, but suddenly stopped working yesterday, then it recovered after ~30 minutes and today it suddenly stopped working again. The error always is:
java.util.concurrent.ExecutionException:
com.google.firebase.auth.FirebaseAuthException: Firebase ID token has
invalid signature. See
https://firebase.google.com/docs/auth/admin/verify-id-tokens for
details on how to retrieve an ID token.
It is still working fine when i test it locally. What could cause this error in this unpredictable way? Are there request limits on the firebase-backend regarding Id token verification requests (which would still be strange, because other times it worked under heavy load just fine)?
Any ideas what might be causing this? I could not find really anything regarding this error.
Thanks!
It appears that there indeed was a server configuration problem with the root certificate. Sadly i cannot give any specifics, because i don't have direct access to the server and only the information the system admin gave me.
I have read about VpnService and VpnService.Builder but could not get any method to set vpn type to PPTP or L2TP, even I didn't get any method where I can set user/ password.
Note: There are many questions in SO I read them but didn't find solution. I looked into ToyVpn application but this there are only 3 parameters we set in this application.
Please help. If there is 3party API, please give the reference.
Yes and all answers in stackoverflow should have told you that VPNService API is for creating your own VPN application with its own VPN stack (which could happen to be PPTP/LT2P/ToyVPN/OpenVPN/MyOwnVerySecure VPN protocol) and not to configure the system VPN.
An API to configure the System VPNs is simple not included in the SDK.