07-13-2018 10:49 - edited 07-16-2018 10:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-13-2018 10:49 - edited 07-16-2018 10:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi,
I'm using Fitbit Web API in my Android app. Everything worked well. But, there have been request errors since I renew my token due to the expiration.
Following logs are the error. It seemed like an authorization problem, so I logged out and then logged in again. After that the problem was solved, but this happened again after a few hours. (I set the token expires_in one year.)
.setTokenExpiresIn(31536000L)
Is there anybody who have this issue? I need your advice. Thanks.
07-13 10:24:54.367 11914-13638/jordan.personicle W/System.err: java.io.FileNotFoundException: https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1min.json
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(Unknown Source:0)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at com.fitbit.fitbitcommon.network.BasicHttpRequest.execute(BasicHttpRequest.java:161)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at jordan.personicle.service.FitBitDataService.reqeustFitBitForTimely(FitBitDataService.java:98)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at jordan.personicle.service.FitBitDataService.onHandleIntent(FitBitDataService.java:86)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at android.os.Handler.dispatchMessage(Handler.java:105)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at android.os.Looper.loop(Looper.java:164)
07-13 10:24:54.368 11914-13638/jordan.personicle W/System.err: at android.os.HandlerThread.run(HandlerThread.java:65)
07-13-2018 10:51 - edited 07-16-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-13-2018 10:51 - edited 07-16-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Any advice? It keeps showing me FileNotFoundException.
If I log out and then log in again, it works well. But, it only takes a few hours even though I set
.setTokenExpiresIn(31536000L)
I worked well before, but suddenly happened.
07-26-2018 15:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-26-2018 15:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @hyungiko2
I'm not sure why you are getting a FileNotFoundException. But, I have seen a recent problem where using Implicit Grant Flow doesn't honor the specified token lifetime. We're currently investigating this problem.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

