runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

java.io.filenotfound exception when uploading to Strava after phone reboot

Open craftyguy opened this issue 9 years ago • 3 comments

Runnerup: 1.53 Android 6.0.1 (Cyanogenmod 13)

While recording with RunnerUp, my device rebooted for some unknown reason. When I try to upload the session that RunnerUp managed to record before the reboot to Strava, I get this error:

05-29 20:55:54.680 27645 27645 I org.runnerup: Start uploading 1
05-29 20:55:54.796 27645 27780 W System  : ClassLoader referenced unknown path: /system/framework/tcmclient.jar
05-29 20:55:58.352 27645 27780 E Strava  : code: 400, amsg: Bad Request
05-29 20:55:58.353 27645 27780 W System.err: java.io.FileNotFoundException: https://www.strava.com/api/v3/uploads
05-29 20:55:58.353 27645 27780 W System.err:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
05-29 20:55:58.354 27645 27780 W System.err:    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
05-29 20:55:58.354 27645 27780 W System.err:    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
05-29 20:55:58.367 27645 27780 W System.err:    at org.runnerup.export.StravaSynchronizer.upload(StravaSynchronizer.java:226)
05-29 20:55:58.368 27645 27780 W System.err:    at org.runnerup.export.SyncManager$15.doInBackground(SyncManager.java:996)
05-29 20:55:58.369 27645 27780 W System.err:    at org.runnerup.export.SyncManager$15.doInBackground(SyncManager.java:989)
05-29 20:55:58.369 27645 27780 W System.err:    at android.os.AsyncTask$2.call(AsyncTask.java:295)
05-29 20:55:58.369 27645 27780 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
05-29 20:55:58.369 27645 27780 W System.err:    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
05-29 20:55:58.369 27645 27780 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
05-29 20:55:58.369 27645 27780 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
05-29 20:55:58.370 27645 27780 W System.err:    at java.lang.Thread.run(Thread.java:818)

I am able to view the record and see it on the map in the RunnerUp app, so it's not like it is blank or does not exist. Strangely, I am able to upload new records successfully.

craftyguy avatar May 30 '16 04:05 craftyguy

Apparently if I tap on "recompute activity", then I am able to successfully upload it to Strava. I suggest handling the error that occurred previously and automatically "recompute activity" rather than just giving up without any message to the user (logcat doesn't count) that an error occurred and the app was unable to upload the activity.

craftyguy avatar May 31 '16 20:05 craftyguy

The proper handling is to handle the exception. Strava is giving a reason for the failure, that should be printed and the handling resolved from there (recompute automatically should not be necessary).

gerhardol avatar Aug 06 '17 22:08 gerhardol

If the phone rebooted during a activity, then there will be an incomplete activity stored...then recompute will "fix" the activity.

does this only happen for those activities ?

if YES, then one could fix this by either

  1. check for incomplete activities when uploading and automatically fix them
  2. check for incomplete activities when starting app and automatically fix them

I made the recompute once when my phone rebooted...but didn't do any of 1&2... (since I figured that it would be a rare efvent)

/Jonas

On Mon, Aug 7, 2017 at 12:16 AM, Gerhard Olsson [email protected] wrote:

The proper handling is to handle the exception. Strava is giving a reason for the failure, that should be printed and the handling resolved from there (recompute automatically should not be necessary).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonasoreland/runnerup/issues/393#issuecomment-320536441, or mute the thread https://github.com/notifications/unsubscribe-auth/AABYS1bgc_JLIxXyVxt7oJ5Mda8hNNAZks5sVjssgaJpZM4IpeQv .

jonasoreland avatar Aug 07 '17 13:08 jonasoreland