Closed cloudlena closed 1 year ago
I just did another test, uploading the newly created file to https://www.fitfiletools.com/#/remover#remover. There, the shown data seems to be very weird:
I'm thinking, the issue might be that the timestamps are not encoded correctly.
Uploading the new.fit
file to http://garmin.kiesewetter.nl/ yields the following error: Upload status: The file could not be uploaded. The following error occured: Unexpected end of file while parsing Name has occurred. Line 151558, position 9.
.
Thanks for the report.
I'll try to look into this if I have some available time (together with your other PRs), but it may take a while.
Thanks, @tormoder! Is there any way I can support more or any more information you might need?
@tormoder are there any news on this issue? Can I support in any way?
@tormoder Hi. Could you please share if you've made decision about this MR? I see hammerhead is using it and I'd like to make use of it as well.
Just released v0.15.0
with #67 included.
@cloudlena, if you're still interested, you can check if that change solves your issue.
Thanks, @tormoder. Indeed, that fixed it for me :tada:
Problem on Strava
The files created by
Encode
are somehow invalid for some platforms. For example, if I upload the newly created file to Strava, it says "The upload contains bad data.".I tried to debug them by having a valid FIT file (e.g., https://github.com/tormoder/fit/blob/master/testdata/me/activity-small-fenix2-run.fit) and running it through the following simple program:
Using FitFileViewer
When uploading the
new.fit
file to https://www.fitfileviewer.com/, it shows empty data (whereas the originalactivity-small-fenix2-run.fit
file showed valid content):Using GPXSee
Weirdly enough, https://www.gpxsee.org/ shows the
new.fit
file correctly.Using RUNALYZE
Analyzing both files with https://runalyze.com/tool/fit-viewer, the main differences seem to be that
new.fit
has a lot ofenhanced_speed
,enhanced_max_speed
,enhanced_altitude
fields on its laps and records (whereasactivity-small-fenix2-run.fit
doesn't have anyenhanced_*
fields) and thatnew.fit
always uses0
as its local message type index.Update: I did another test run where I removed the code that generates the
enhanced_*
field generation code from this library and even without those, neither Strava nor FitFileViewer would accept the file. So I'm guessing that those aren't the problem.