Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

same activity upload: for some users response 500 internal server error

ANSWERED

We get reports from several users of our app that they can't upload activity data to Fitbit anymore (since 1 or 2 days). We checked it and we see that they get the following error response when uploading an activity:

{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}

We tested this with two Fitbit test accounts: with Postman we uploaded the same activity data sucessfully to one test account, but on the other account it fails with the internal error. We only changed the authorization token and the user id. We reauthorized the test user, but that didn't solve the problem, the activity uploads keeps returning the 500 response.

I can give you detailed information to reproduce this, but preferably not here in the public forum.

Best Answer
1 BEST ANSWER

Accepted Solutions

@JohnFitbit just confirmed to us (in a support ticket) that the POST of activity data without the 'manualCalories' field is working again. We tested it and we can confirm that the optional manualCalories field is really optional again, as described in the API specification.

I'm not sure about POST requests of activity data with the intensity level activity id instead of a directory activity id, but we changed all activity POST requests to directory activity ids and that's working fine.

View best answer in original post

Best Answer
29 REPLIES 29

This is happening to a lot of users as well. Here's a example request:

https://api.fitbit.com/1/user/-/activities.json

{ activityId = 90013; date = "this forum won't let supply a date"; distance = 11487; distanceUnit = Steps; durationMillis = 86400000; startTime = "00:00:00"; }

Does this happen if a user already has steps recorded for that day from another source?

Thanks,

Chris

Best Answer
0 Votes

With a test account I now saw one activity uploaded by our app appear in Fitbit, although this activity was uploaded with the same error response (500), so it seems it was processed in some way, but it didn't appear until another activity was manually added to Fitbit. An activity uploaded to the same test account earlier today still didn't appear (that upload also got the 500 response). Something seems to be really wrong. This started just two days ago, no changes in our app.

Best Answer

Fitbit (John) confirmed that Fitbit is aware of the issue and working on it. It now also affects the GET activities requests (not only the POST). 
The Fitbit status page shows the current status: https://status.fitbit.com/

Best Answer
0 Votes

As far as we can see, the GET/POST activities 500 issue has been resolved now. On our test devices it is working again, and no new reports issues by users of our app.

Best Answer
0 Votes

And the problem is back, again the 500 response, with a failed upload of activity data.

Best Answer
0 Votes

With POST activity request,  there is still a 500 internal error when you do the following:

  • POST activities without the manualCalories query parameter. This parameter is optional when you use the Fitbit activityId parameter, but the Fitbit API doesn't accept it at the moment. You can add the manualCalories parameter with value 0, and it will work
  • POST activities with an intensity level activity id. According to the specification this should work, it worked until the beginning of this month. When you use the directory activity id it works fine.

It seems some developers did some changes with the Fitbit API server code, without reading the API specifications 😞 
We reported it to Fitbit, so hopefully it will be fixed, or the API specification will be updated.

Best Answer
0 Votes

Hi @Hielko 

Thank you for reporting the 2 POST activity problems.   Let me try to reproduce the issues and submit tickets to our engineering team.   For the second problem, would you please provide me with the activity id that works and the one that fails?   I'm not exactly certain what you mean in that situation.

Thanks!

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi Gordon, thank you for your response. I provided detailed information in the support case Fitbit Case #00109013, which has been ongoing for some time. Your colleague, John, was my contact last week. I believe you can access the case to review my latest messages. Let me know if I have to sent any information again. Thanks for your support!

Hielko

Best Answer
0 Votes

Great!   I'll take a look at case 00109013.   More than likely, engineering already knows about your problem.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

@Gordon-C @Hielko Do you have the link to the Fitbit case 00109013? Our users a really upset at the moment. Especially users who have been using our app for years. We've had 10x the number refunds than we normal get. The only things that seems to work for us is if our users keep trying to make the requests. It's almost like there are a couple servers with the old code that works.

Best Answer

Hi, yeah, can you please treat this issue as a high priority one? The inability to post activities for several days is a pretty huge deal I would say? Surely this will break many apps.

Also if it is true that `manualCalories` is now required and that is the source of the issue, can the API response include that info?

Thanks.

Best Answer

@Gordon-C Any news?

Best Answer
0 Votes

This is ridiculous!  I have not been able to sync the myfitness app since September 1. That is 11 days ago and I don’t think it worked on August 31 either. I use this to sync my Apple fitness to my silver sneakers account. I have been getting the same error that it cannot sync and is either from my internet…which is isn’t…to Fitbit servers and to send info to,app. I have three times. They are frustrated and said it has to do with Fitbit servers. Please fix this

Best Answer
0 Votes

@Gordon-C Any news? We would really appreciate any response at this point.

Best Answer

Yes. Please give us an update @Gordon-C 

Best Answer

@Gordon-C Any news?

 

Best Answer

@JohnFitbit just confirmed to us (in a support ticket) that the POST of activity data without the 'manualCalories' field is working again. We tested it and we can confirm that the optional manualCalories field is really optional again, as described in the API specification.

I'm not sure about POST requests of activity data with the intensity level activity id instead of a directory activity id, but we changed all activity POST requests to directory activity ids and that's working fine.

Best Answer

Thanks @Hielko !

I wish this thread would have been updated by Fitbit people... This is a very poor experience. 

Best Answer

Can you explain the intensity level activity IDs versus directory activity IDs a little more?

I'm still getting 500 response errors since this has started. I've always been sending this structure, using the fitbit python library.  

activity = {
'activityId': 90009, # The ID of the activity
'durationMillis': 3600000, # The duration of the activity in milliseconds
'startTime': '7:00', # The start time of the activity in format 'HH:mm'
'date': date_str, # The date of the activity in format 'yyyy-MM-dd'
'distance': 7 # The distance of the activity in miles
}

I even tried adding the manualCalories entry as suggested but that was also returning 500 error.  

Best Answer
0 Votes