julien-nc / gpxpod

Nextcloud app to view gpx track files
GNU Affero General Public License v3.0
40 stars 3 forks source link

GpxPod suddenly stops parsing files after update to NC 25 #13

Closed kekonn closed 1 year ago

kekonn commented 1 year ago

The error:


  | Exception: Failed to parse time string (2022-03-27T15:32:37.504+02:00[Europe/Brussels]) at position 29 ([): Unexpected character/var/www/html/custom_apps/gpxpod/lib/Controller/OldPageController.php - line 611: DateTime->__construct("2022-03-27T ... ]")
/var/www/html/custom_apps/gpxpod/lib/Controller/OldPageController.php - line 1074: OCA\GpxPod\Controller\OldPageController->getMarkerFromFile([ "OC\\Files\\Node\\File"], "kekkon")
/var/www/html/custom_apps/gpxpod/lib/Controller/OldPageController.php - line 1268: OCA\GpxPod\Controller\OldPageController->getMarkersFromFiles([ [ "OC\\Fil ... "], "kekkon")
/var/www/html/custom_apps/gpxpod/lib/Controller/OldPageController.php - line 1143: OCA\GpxPod\Controller\OldPageController->processGpxFiles([ "OC\\Files ... "], "/Documents/Mototracks", "kekkon", false, true, true, false)
/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 225: OCA\GpxPod\Controller\OldPageController->getTrackMarkersText("/Documents/Mototracks", false, false)
/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 133: OC\AppFramework\Http\Dispatcher->executeController([ "OCA\\GpxP ... ]], "getTrackMarkersText")
/var/www/html/lib/private/AppFramework/App.php - line 172: OC\AppFramework\Http\Dispatcher->dispatch([ "OCA\\GpxP ... ]], "getTrackMarkersText")
/var/www/html/lib/private/Route/Router.php - line 298: OC\AppFramework\App::main("OCA\\GpxPod ... r", "getTrackMarkersText", [ "OC\\AppFr ... "], [ "gpxpod.ol ... "])
/var/www/html/lib/base.php - line 1047: OC\Route\Router->match("/apps/gpxpod/tracks-old")/var/www/html/index.php - line 36: OC::handleRequest()
-- | --

I am on the latest version op GpxPod (5.0.5).

julien-nc commented 1 year ago

Thanks for the bug report. Could you provide an example track so I could try to reproduce the issue? Or at least a sub part of a track which contains a problematic date?

kekonn commented 1 year ago

Sure, I think this is the specific track it's struggling : https://gist.github.com/kekonn/cc516d9b646d4845718ba051bea50a48

kekonn commented 1 year ago

Incidentally, because it couldn't parse this one track in the entire folder, it wouldn't show any track in that folder. So it seems that the error handling could be a bit more robust.

julien-nc commented 1 year ago

Thanks. Pretty clear incorrect time format in your file.

<time>2022-03-27T15:32:37.504+02:00[Europe/Brussels]</time>

is definitely not supported by the GPX specs (and any date parser I know :grin:). Did you get this file directly from Calimoto or was it processed by something else?

Anyway I made the track process safer and made it work in your specific case so your track will have point times (and full stats).

Could you try v5.0.6-1-nightly? If not, v5.0.6 will come soon anyway.

kekonn commented 1 year ago

I got this from someone else, but I guess it was directly recorded with calimoto. I thought it was a funny way of noting the timezone.

kekonn commented 1 year ago

Question: I looked in the apps interface on my nextcloud instance, but I couldn't find a beta/nightly channel or anything. How do I install the nightly version?

julien-nc commented 1 year ago

Same procedure as github.com/julien-nc/cospend-nc#nightly After having tested it, as there is no database migration, going back from the latest nightly to v5.0.5 will work just fine.

kekonn commented 1 year ago

I tried it with the nightly version and that fixed the problem, thanks!

julien-nc commented 1 year ago

Thanks for the feedback. v5.0.6 is out