I am developing Android Authenticator. I am getting the following exception while sending MAKE_CREDENTIAL response. I got this issue while debugging with webauthn.io site. Also tried with https://webauthn.me/debugger#
The operation either timed out or was not allowed. See: https://w3c.github.io/webauthn/#sec-assertion-privacy.
But I am using Timer and TimerTask to send kKeepAliveMillis for every 500 milliseconds after receiving MAKE_CREDENTIAL request. I don’t know why I am getting is this issue. Please help me to solve this issue.
Related
I am learning Android and I have written some simple apps which work. The apps individually are quite simple. But I want to execute these as asynchronous functions in the background without using intervention at regular intervals. For example, this is the sequence of methods I want to execute every 15 minutes:
Check for internet connectivity
Try to access www.google.com and return success or failure
Try to access a bad URL so you get a failure
Send SMS in background check for success or failure
Send gmail in background check for success or failure
Send yahoo mail in background check for success or failure
I can create a method for each of the items. The question is how do I execute each of these one after another and get the result to log? Then repeat the whole process. Do I need to sleep() between each of these activity?
I can do this in iOS Swift using NSURLSession.
Appreciate your help and guidance on this.
This is the error that I am currently receiving when I try to get my request tokens from Twitter:
org.scribe.exceptions.OAuthConnectionException: There was a problem while creating a connection to the remote service.
I've tested if I am on the UI thread or other threads (not on the UI thread). The current error is nondescript - what is the best/fastest way for me to figure out why remote connection is not working.
This was working a few hours ago, but when I went home it stopped getting connected.
current version of ScribeJava has additionally an url in such error statements.
https://github.com/scribejava/scribejava/blob/04195020558ea17ba1c271b85ef40977055942c8/scribejava-core/src/main/java/com/github/scribejava/core/model/OAuthRequest.java#L39
stacktrace here as well
You can download sources and debug as well. Or enhance ScribeJava even more by creating new Pull Request.
I've got an ASP.NET MVC 5 application running with some WebAPI controllers. I have an Android app that sends a request to the WebAPI every second. The strange thing is that it works fine on some phones; the request is sent successfully and the correct function is called. However, on my phone it doesn't work properly; the function is called every 10 to 20 seconds. Then, when I kill the Android app, all the requests suddenly come through and the function is called.
How can this be fixed? Is it perhaps some strange setting on my phone that I must change? I really need the requests to go through every second and get processed.
Using LogCat in Eclipse, I see that an exception is sometimes thrown: org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.7:55555 refused.
Thanks for any help.
Update:
After some investigating, it appears that the issue is caused by using AsyncTask. I've found something here which has kind of fixed the problem. However, now a batch of requests is sent every few seconds, instead of once every second. I'll try to implement the request-sending without using AsyncTask.
I have faced a very weird problem by using Soap object in android. I am running a background thread which will take care of sending data to server periodically. Here i am using Soap web service for sending data. While sending a data to server,Sometime duplicate request(double time sending same data) occurs in server.
How to overcome this issue? Please help me...
Thanks in advance...
Firstly check if there's any loop/condition which is causing the error.
Secondly always within a thread whenever HTTP requests are involved make them synchronized and set a boolean whenever request is fired. Reset the boolean ones the response is received successfully and then fire the next request.
These requests for synchronization can be queued in a list and ones a successful response is received remove the request from list else pop the request out and place according to your need (logically back at the end - so that other requests also get a chance if one is failing repetedly).
I have a similiar situation like this: How do I handle/fix "Error getting response stream (ReadDone2): ReceiveFailure" when using MonoTouch? but I'm only GETing a list, not posting anything in the body.
Furthermore, I'm using RestSharp, and it works in almost all the cases, but every once in a while I receive Error getting response stream (ReadDone2): ReceiveFailure.
What can possibly be the problem?
(ps: the exact same code on Wp7 doesn't cause any errors)
There is a bug report (https://bugzilla.xamarin.com/show_bug.cgi?id=19673) which appears to have a reproducible example. So, at the least, you could add yourself to the CC list for it.
(BTW, I get the error (also using restsharp) under Linux (Mint/17, Mono 3.2.8), so it is not specific to Android. It is hard to reproduce: for me it is simply happening after between 1000 and 10,000 web service calls, and it always works when restarting. I am not seeing a CPU or memory problem. It could be some buffer build-up, or might simply be a network failure, or even remote server problem?)