-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Indicate in UI whether data is lost by implementing timeout #52
Comments
Sorry, I think this may have been due to a couple of server restarts where the server was down. It shouldn't be happening anymore. To answer your comment - the app loses the data if there is no connection. It doesn't wait until the server is back online. I'm not necessarily sure I want to design something that assumes the server will be offline every once in awhile, because nominally it never will. But please let me know if you are continually experiencing this and I can implement a fix though. |
I used my own server that was not restarted.
But once I was able to record data for several places without connection. My server was in internal network and not available from internet but I recorded outside, on mobile network, where my server on 192.168.x.x was not available. Then after I connected to my wifi, app uploaded all data. Maybe HTTP requests are retried? BTW, it's not clear in UI if application loses data. I think UI should indicate it. |
Ah okay! I misunderstood. So the app is written in Cordova and uses the jQuery ajax call to submit data. It seems that jQuery ajax has no timeout by default and the set by the browser. I have no idea what the timeout is, but I think you are right - I guess the HTTP requests are retried until they make it to the server since it could be a long timeout. The data is lost if you see "Error: X" instead of "Inserted Y...." as there is a callback function for ajax related errors. I can certainly make this more obvious on the UI. I think setting the timeout will help and then alerting the user/turning off tracking when data are lost. |
Sometimes Android app loses data collected during time where there was no connection to server. Sometimes it works correctly and uploads data later.
The text was updated successfully, but these errors were encountered: