thomaschampagne / elevate

A sport app to "Elevate" your training experience and goals! Track your fitness and progressions over time. Analyse deeper your activities. And more...
https://thomaschampagne.github.io/elevate-docs/
Mozilla Public License 2.0
1.28k stars 175 forks source link

Javascript error when restoring activities from backup #1000

Closed rodrigoavga closed 4 years ago

rodrigoavga commented 4 years ago

When I try to restore the extension info from a previously generated backup (to move the data to a different computer), the "restore" button does nothing. It throws a JavaScript error every time I click it.

The console logs the following:

ERROR SyntaxError: Unexpected token , in JSON at position 6
    at JSON.parse (<anonymous>)
    at FileReader.t.onload (main-es2015.8ca14f730ea9eaf5d379.js:formatted:98056)
    at l.invoke (polyfills-es2015.6e32956ddc3f10b678d3.js:1)
    at Object.onInvoke (main-es2015.8ca14f730ea9eaf5d379.js:formatted:70955)
    at l.invoke (polyfills-es2015.6e32956ddc3f10b678d3.js:1)
    at i.runGuarded (polyfills-es2015.6e32956ddc3f10b678d3.js:1)
    at FileReader.<anonymous> (polyfills-es2015.6e32956ddc3f10b678d3.js:1)
bi @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:64241
handleError @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:64253
next @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:71347
i @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:69880
__tryOrUnsub @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:11089
next @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:11052
_next @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:11012
next @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:10997
next @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:52686
emit @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:69872
(anonymous) @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:70968
invoke @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
run @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
runOutsideAngular @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:70999
onHandleError @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:70968
handleError @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
runGuarded @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
(anonymous) @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
load (async)
set @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
onRestore @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:98055
(anonymous) @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:98036
Yl @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:67504
r @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:67514
(anonymous) @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:76844
invokeTask @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
onInvokeTask @ main-es2015.8ca14f730ea9eaf5d379.js:formatted:70946
invokeTask @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
runTask @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
invokeTask @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
p @ polyfills-es2015.6e32956ddc3f10b678d3.js:1
f @ polyfills-es2015.6e32956ddc3f10b678d3.js:1

The error line is: main-es2015.8ca14f730ea9eaf5d379.js:formatted:64241

I've attached my CSV file in case it helps. elevate_activities_export.2020.10.11-18.30.51.csv.zip

Extension info:

Plugin version: 6.16.2 Stable Angular Core version: 8.2.14 Angular Material version: 8.2.3 D3js version: 5.16.0

Chrome version:

Versión 86.0.4240.75 (Build oficial) (64 bits)

Cheers!

thomaschampagne commented 4 years ago

This is not a backup. Backup format is a json file.

Backup from here:

image

rodrigoavga commented 4 years ago

Is it possible there is something wrong with my version of the extension? I can no longer see the "Backup activities" options on the menu. This is what I see:

no backup option

thomaschampagne commented 4 years ago

You hit the wrong button

rodrigoavga commented 4 years ago

Oh holy crap, I feel like an idiot. I had to click on the sync button. Sorry and thanks Thomas!