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

Abnormal 'activeDuration' value for activities

For some of our users, we started getting abnormal 'activeDuration' values for activities, which don't fit into int value.

Sample log is: 

feign.FeignException: Numeric value (1721157995000) 
out of range of int (-2147483648 - 2147483647)
at [Source: (BufferedReader); line: 456, column: 36]
(through reference chain:
com.myapp.dto.ActivityLogsResponse["activities"]
->java.util.ArrayList[4]->com.myapp.dto.ActivityLog["activeDuration"])
reading GET https://api.fitbit.com/1/user/-/activities/list.json?afterDate=...&sort=asc&limit=20&offset=60

We have this issue for at least the following users: BBQVLQ, BTDH4W, 4R63Z6, and 6HHW9R.

The first exception of that kind was noted on September 09.

I assume no activity can be 1721157995000 milliseconds (ca 55 years) long, please kindly look into this issue. Is there any quick workaround for us?

Best Answer
6 REPLIES 6

Hi @martaen 

We have fixed numerous problems with the data returned by the activity endpoints.   Some of those fixes were released earlier today.  Would you please retry your queries and let me know if the problem still exists.   If it does, please provide the raw json response.

Thanks!

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

Hi @Gordon-C 

Unfortunately, the problem still exists. Here are a couple of raw json responses from GET /1/user/-/activities/list.json:

{
    "activities": [
        {
"logId": five seven seven six five five 8463547837672,
            "duration": 6461000,
            "activeDuration": 1721157995000,
           
         }
    ]
}
{
    "activities": [
        {
"logId": 8786012385284776208,
            "duration": 843000,
            "activeDuration": 1721345958000,
           
        },
        {
"logId": six eight seven five five three 2609159478592,
            "duration": 3145000,
            "activeDuration": 1721399919000,
           
         },
        {
"logId": three four six three two 52801385119264,
            "duration": 2471000,
            "activeDuration": 1721573794000,
           
         },
        
    ]
}

You can see that the activeDuration value in these samples is unrealistic.

We have this issue with at least four users: BBQVLQ, BTDH4W, 4R63Z6, and 6HHW9R.

Thank you for looking into it!

P.S. The text validation system here wouldn't allow me to post some of the log ids, I had to replace some numbers with words, this is not the part of the actual response.

Best Answer
0 Votes

Hi @Gordon-C, are there any news on this issue? We still can't get data for several users because of it.

Best Answer
0 Votes

Hi @martaen 

I heard back from engineering and we need a few more details from you.   Would you please provide the example for each of the users you provided: BBQVLQ, BTDH4W, 4R63Z6, and 6HHW9R?   I'll need to know the date of the exercise and the log ID.

Thanks!

Gordon

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

@Gordon-C , there are some samples with log ids in my message from September 17, in this thread, will they do?

Best Answer
0 Votes

Hi @martaen 

I need to get some additional information from you and will send you an email.

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