Complete
over 5 years ago

WERETECH-8593

We were unable to reproduce this issue, but we can investigate further if we receive more complaints about this issue.

Fit files created by simulator no longer able to be converted to csv using FitCSVTool.jar

I am using SDK 3.1.7 and FitSDKRelease_21.22.00.

I run the simulator and create some data using Simulation->FIT Data->Simulate Data.  After running this I select Stop and then select 'Save FIT session' which asks me for a filename etc.

In the past I could then convert the FIT file into a csv by running:

java -jar /.../FitSDKRelease_<nn_nn_nn>/java/FitCSVTool.jar -b <file>.fit <file>.csv

but this is now returning the following error:

FIT CSV Tool - Protocol 2.0 Profile 21.22 Release
Exception in thread "main" java.lang.RuntimeException: com.garmin.fit.FitRuntimeException: FIT decode error: File is not FIT format.  Check file header data type. Error at byte: 24
    at com.garmin.fit.csv.CSVTool.run(CSVTool.java:246)
    at com.garmin.fit.csv.CSVTool.main(CSVTool.java:332)
Caused by: com.garmin.fit.FitRuntimeException: FIT decode error: File is not FIT format.  Check file header data type. Error at byte: 24

I am using macOS Mojave v.10.14.6

  • Sorry if I chime in here. But it's unknown for me whether OP has already responded or not, e.g. via e-mail.

    As I've already mentioned I'd exactly the same issue as OP. In the meantime this issue is largely solved, as can be seen and reproduced in

    forums.garmin.com/.../remarks-about-saving-replaying-a-fit-with-sim

    The reason for this issue is mainly an operation error of the user with using the sim. If the activity isn't explicitely saved, the .fit isn't properly finalized or something else. This causes to abort FitCVSTool.jar with error, or if replaying the .fit with the sim nothing happens.

    Since it's always possible that a user not properly saves a .fit, I think it's a good idea for a RFE. It make sense to support/warn the user to generally prevent this issue. IMHO this can be done by forcing the finalizing of the .fit, or blocking the saving of the .fit by greying out the save option, or at least output a warning message if saving a corrupt .fit.

  • Hi

    We have tried to reproduce this on both windows and mac with no luck. Would you be willing to try to decode this fit file to see if it also fails? We are able to decode this file successfully. (If you are unable to download it from the forum, this is just a recording from the RecordSample packaged with the sdk. Save a fit session from the RecordSample app and try to decode it.)

    To help us figure out what is going on, would you:

    1. Try decoding the fit file attached (or saved from the Record Sample app)
    2. Send us your fit file (click and drag it into a comment on this thread, or send to [email protected] with a link to this post)
    3. If you are willing, you can send us a .zip of your project to the email above.

    If you are unable to unzip the attached .fit file, I would recommend re-installing your Fits SDK from https://www.thisisant.com/resources/fit-sdk-beta/ as you might have an issue with your fit sdk.

    TryThisFit.zip

  • Recently I've also tried the option "Save FIT Session". Even the saved .fit can't replayed with the option "Playback File".