This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Corrupt FIT file recovery suggestions

Hi. My Edge 520 had a minor crash, after I cycled it off and on again it came back but my fit file from yesterday and the previous two days were missing. I managed to recover them, but yesterday's file is corrupt. Does anyone have an suggestions on how to fix this.

I tried to convert it to csv using the FIT SDK v21.54.01 and got this error:

FIT CSV Tool - Protocol 2.0 Profile 21.54 Release
Exception in thread "main" java.lang.RuntimeException: com.garmin.fit.FitRuntimeException: FIT decode error: Endian 32 not supported. Error at byte: 2095
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: Endian 32 not supported. Error at byte: 2095
at com.garmin.fit.Decode.read(Decode.java:777)
at com.garmin.fit.Decode.resume(Decode.java:372)
at com.garmin.fit.Decode.read(Decode.java:349)
at com.garmin.fit.csv.CSVTool.run(CSVTool.java:220)
... 1 more

When I tried to use the Garmin online fit repair tool at http://garmin.kiesewetter.nl/ I get 

Unexpected end of file while parsing Name has occurred. Line 151558, position 9.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: Unexpected end of file while parsing Name has occurred. Line 151558, position 9.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[XmlException: Unexpected end of file while parsing Name has occurred. Line 151558, position 9.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +72
   System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +116
   System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) +23
   System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos) +5314876
   System.Xml.XmlTextReaderImpl.ParseElement() +493
   System.Xml.XmlTextReaderImpl.ParseElementContent() +119
   System.Xml.XmlTextReaderImpl.Read() +44
   System.Xml.XmlTextReader.Read() +15
   System.Data.DataTextReader.Read() +15
   System.Data.XmlDataLoader.LoadColumn(DataColumn column, Object[] foundColumns) +1204
   System.Data.XmlDataLoader.LoadTable(DataTable table, Boolean isNested) +1069
   System.Data.XmlDataLoader.LoadData(XmlReader reader) +446
   System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving) +2230
   System.Data.DataSet.ReadXml(String fileName) +76
   myFit.fitFileReader..ctor(FileStream file, String outFullname) in C:\Users\Thom\documents\visual studio 2010\Projects\fitreader\SimpleFitreader\fitFileReader.cs:159
   myFit.repairFit.ConvertToTxt(String inFullname) in C:\Users\Thom\documents\visual studio 2010\Projects\fitreader\SimpleFitreader\repairFit.cs:16
   FitRepairWeb2._Default.fitTotxt_Click(Object sender, EventArgs e) in C:\Users\Thom\documents\visual studio 2010\Projects\fitreader\FitRepairWeb2\Default.aspx.cs:54
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782702
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

Does anyone have an other suggestions?

Top Replies

  • Hi. My Edge 520 had a minor crash, after I cycled it off and on again it came back but my fit file from yesterday and the previous two days were missing. I managed to recover them, but yesterday…
  • I uploaded it and it isn't even my activity from yesterday

    There were timestamps for all sorts of dates, including some in the future.Smile But June 30th 2021 had the bulk of the uncorrupted…

All Replies

  • 2021-07-07-16-47-16.fit.123

    I added the .123 extension so this would upload

  • Hi. My Edge 520 had a minor crash, after I cycled it off and on again it came back but my fit file from yesterday and the previous two days were missing. I managed to recover them, but yesterday's file is corrupt. Does anyone have an suggestions on how to fix this.

    That is often the case when using one of the undelete applications. I was able to recover what I assume is a small portion of the actual ride using Fit File Repair Tool.

    This will upload to Garmin Connect - 2746.2021-07-07-16-47-16-fixed.fit

    Message from the tool states "144,731 bytes of the file are corrupted and could not be repaired.," which is about half of the entire fit file.

    If you have any other fit files around that same time in the \GARMIN\ACTIVTITY folder, there is a slim chance these are also partial files which could be pieced together to make a whole activity.

  • Oh this is very helpful. Thank you. So it was probably the undelete application that really messed it up. And thanks for your file fix. I uploaded it and it isn't even my activity from yesterday but it is from a week ago (June 30th) and my Garmin is missing all the files from June 29th onward so I guess that makes sense.

    I'll poke around my device a bit more. I couldn't find any files after the 29th in my activity folder which is why I ended up using some undelete application.

    Again, thank you so much!

  • I uploaded it and it isn't even my activity from yesterday

    There were timestamps for all sorts of dates, including some in the future.Smile But June 30th 2021 had the bulk of the uncorrupted timestamps.