Maps: Loading GPX files fails on most GPX files

Created on 12 May 2020  Â·  7Comments  Â·  Source: nextcloud/maps

I copied some saved tracks from a Garmin Oregon 550 device to my nextcloud 17 instance with maps plugin 0.1.6. Some of those .gpx can be shown on the map, but most don't. The error message in German reads „Laden des Streckeninhalts fehlgeschlagen.“

From the error log I get this for example:

{"reqId":"Vyh3box1MFbiP2ZqnlNA","level":3,"time":"2020-05-12T17:46:24+00:00","remoteAddr":"fd5b:86e0:557e:0:a06b:e017:9f43:5e07","user":"alex","app":"index","method":"GET","url":"/index.php/apps/maps/tracks/182","message":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing 'UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?' with params [\"{\\\"lat\\\":52.1261667553, \\\"lng\\\":11.6107696854, \\\"name\\\": \\\"Track_12-MAY-20 191632.gpx\\\", \\\"distance\\\": 7582.014, \\\"duration\\\": 1799, \\\"begin\\\": 1589284763, \\\"end\\\": 1589286562, \\\"posel\\\": 19.71, \\\"negel\\\": 92.79, \\\"minel\\\": 104.44, \\\"maxel\\\": 173.66, \\\"maxspd\\\": 29.09, \\\"avgspd\\\": 15.17, \\\"movtime\\\": 1533, \\\"stptime\\\": 280, \\\"movavgspd\\\": 17.81, \\\"n\\\": 52.14810630, \\\"s\\\": 52.12613432, \\\"e\\\": 11.65935874, \\\"w\\\": 11.60873624, \\\"trnl\\\": [\\\"12-MAY-20 19:16:32\\\"], \\\"lnkurl\\\": \\\"http:\\/\\/www.garmin.com\\\", \\\"lnktxt\\\": \\\"Garmin International\\\", \\\"movpace\\\": 3.37}\", \"349866873230bfb6664fe0077873880c\", 182]:\n\nSQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1","Code":0,"Trace":[{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->","args":["An exception occurred while executing 'UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?' with params [\"{\\\"lat\\\":52.1261667553, \\\"lng\\\":11.6107696854, \\\"name\\\": \\\"Track_12-MAY-20 191632.gpx\\\", \\\"distance\\\": 7582.014, \\\"duration\\\": 1799, \\\"begin\\\": 1589284763, \\\"end\\\": 1589286562, \\\"posel\\\": 19.71, \\\"negel\\\": 92.79, \\\"minel\\\": 104.44, \\\"maxel\\\": 173.66, \\\"maxspd\\\": 29.09, \\\"avgspd\\\": 15.17, \\\"movtime\\\": 1533, \\\"stptime\\\": 280, \\\"movavgspd\\\": 17.81, \\\"n\\\": 52.14810630, \\\"s\\\": 52.12613432, \\\"e\\\": 11.65935874, \\\"w\\\": 11.60873624, \\\"trnl\\\": [\\\"12-MAY-20 19:16:32\\\"], \\\"lnkurl\\\": \\\"http:\\/\\/www.garmin.com\\\", \\\"lnktxt\\\": \\\"Garmin International\\\", \\\"movpace\\\": 3.37}\", \"349866873230bfb6664fe0077873880c\", 182]:\n\nSQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1",{"errorInfo":["22001",1406,"Data too long for column 'metadata' at row 1"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":145,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["22001",1406,"Data too long for column 'metadata' at row 1"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"},"An exception occurred while executing 'UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?' with params [\"{\\\"lat\\\":52.1261667553, \\\"lng\\\":11.6107696854, \\\"name\\\": \\\"Track_12-MAY-20 191632.gpx\\\", \\\"distance\\\": 7582.014, \\\"duration\\\": 1799, \\\"begin\\\": 1589284763, \\\"end\\\": 1589286562, \\\"posel\\\": 19.71, \\\"negel\\\": 92.79, \\\"minel\\\": 104.44, \\\"maxel\\\": 173.66, \\\"maxspd\\\": 29.09, \\\"avgspd\\\": 15.17, \\\"movtime\\\": 1533, \\\"stptime\\\": 280, \\\"movavgspd\\\": 17.81, \\\"n\\\": 52.14810630, \\\"s\\\": 52.12613432, \\\"e\\\": 11.65935874, \\\"w\\\": 11.60873624, \\\"trnl\\\": [\\\"12-MAY-20 19:16:32\\\"], \\\"lnkurl\\\": \\\"http:\\/\\/www.garmin.com\\\", \\\"lnktxt\\\": \\\"Garmin International\\\", \\\"movpace\\\": 3.37}\", \"349866873230bfb6664fe0077873880c\", 182]:\n\nSQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1"]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1063,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["22001",1406,"Data too long for column 'metadata' at row 1"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"},"UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?",{"1":"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","2":"349866873230bfb6664fe0077873880c","3":182}]},{"file":"/srv/nextcloud/lib/private/DB/Connection.php","line":216,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?",["{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c",182],[2,2,1]]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = :dcValue2, `etag` = :dcValue3 WHERE `id` = :dcValue4",{"dcValue1":"182","dcValue2":"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","dcValue3":"349866873230bfb6664fe0077873880c","dcValue4":182},{"dcValue1":1,"dcValue2":2,"dcValue3":2,"dcValue4":1}]},{"file":"/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":214,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Service/TracksService.php","line":307,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Controller/TracksController.php","line":121,"function":"editTrackInDB","class":"OCA\\Maps\\Service\\TracksService","type":"->","args":[182,null,"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"getTrackFileContent","class":"OCA\\Maps\\Controller\\TracksController","type":"->","args":["182"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["TracksController","getTrackFileContent",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/base.php","line":997,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/maps/tracks/182"]},{"file":"/srv/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php","Line":106,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1","Code":"22001","Trace":[{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1054,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->","args":[]},{"file":"/srv/nextcloud/lib/private/DB/Connection.php","line":216,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?",["{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c",182],[2,2,1]]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = :dcValue2, `etag` = :dcValue3 WHERE `id` = :dcValue4",{"dcValue1":"182","dcValue2":"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","dcValue3":"349866873230bfb6664fe0077873880c","dcValue4":182},{"dcValue1":1,"dcValue2":2,"dcValue3":2,"dcValue4":1}]},{"file":"/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":214,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Service/TracksService.php","line":307,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Controller/TracksController.php","line":121,"function":"editTrackInDB","class":"OCA\\Maps\\Service\\TracksService","type":"->","args":[182,null,"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"getTrackFileContent","class":"OCA\\Maps\\Controller\\TracksController","type":"->","args":["182"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["TracksController","getTrackFileContent",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/base.php","line":997,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/maps/tracks/182"]},{"file":"/srv/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":119,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1","Code":"22001","Trace":[{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","line":117,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1054,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->","args":[]},{"file":"/srv/nextcloud/lib/private/DB/Connection.php","line":216,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?",["{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c",182],[2,2,1]]},{"file":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["UPDATE `oc_maps_tracks` SET `metadata` = :dcValue2, `etag` = :dcValue3 WHERE `id` = :dcValue4",{"dcValue1":"182","dcValue2":"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","dcValue3":"349866873230bfb6664fe0077873880c","dcValue4":182},{"dcValue1":1,"dcValue2":2,"dcValue3":2,"dcValue4":1}]},{"file":"/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":214,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Service/TracksService.php","line":307,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/srv/nextcloud/apps/maps/lib/Controller/TracksController.php","line":121,"function":"editTrackInDB","class":"OCA\\Maps\\Service\\TracksService","type":"->","args":[182,null,"{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http://www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}","349866873230bfb6664fe0077873880c"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"getTrackFileContent","class":"OCA\\Maps\\Controller\\TracksController","type":"->","args":["182"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Maps\\Controller\\TracksController"},"getTrackFileContent"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["TracksController","getTrackFileContent",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"id":"182","_route":"maps.tracks.getTrackFileContent"}]},{"file":"/srv/nextcloud/lib/base.php","line":997,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/maps/tracks/182"]},{"file":"/srv/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":117}},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0","version":"17.0.6.2","id":"5ebae0f0030ca"}
[index] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?' with params ["{\"lat\":52.1261667553, \"lng\":11.6107696854, \"name\": \"Track_12-MAY-20 191632.gpx\", \"distance\": 7582.014, \"duration\": 1799, \"begin\": 1589284763, \"end\": 1589286562, \"posel\": 19.71, \"negel\": 92.79, \"minel\": 104.44, \"maxel\": 173.66, \"maxspd\": 29.09, \"avgspd\": 15.17, \"movtime\": 1533, \"stptime\": 280, \"movavgspd\": 17.81, \"n\": 52.14810630, \"s\": 52.12613432, \"e\": 11.65935874, \"w\": 11.60873624, \"trnl\": [\"12-MAY-20 19:16:32\"], \"lnkurl\": \"http:\/\/www.garmin.com\", \"lnktxt\": \"Garmin International\", \"movpace\": 3.37}", "349866873230bfb6664fe0077873880c", 182]:

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1 at <<closure>>

 0. /srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
 1. /srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 1")
 2. /srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1063
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE `oc_maps ... ?", {1: "{\"lat\":52 ... 2})
 3. /srv/nextcloud/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("UPDATE `oc_maps ... ?", ["{\"lat\":52.12 ... 2], [2,2,1])
 4. /srv/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 203
    OC\DB\Connection->executeUpdate("UPDATE `oc_maps ... 4", {dcValue1: "182" ... 2}, {dcValue1: 1,dcV ... 1})
 5. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /srv/nextcloud/apps/maps/lib/Service/TracksService.php line 307
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /srv/nextcloud/apps/maps/lib/Controller/TracksController.php line 121
    OCA\Maps\Service\TracksService->editTrackInDB(182, null, "{\"lat\":52.126 ... }", "349866873230bfb6664fe0077873880c")
 8. /srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Maps\Controller\TracksController->getTrackFileContent("182")
 9. /srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Maps\Controller\TracksController {}, "getTrackFileContent")
10. /srv/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Maps\Controller\TracksController {}, "getTrackFileContent")
11. /srv/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("TracksController", "getTrackFileContent", OC\AppFramework\ ... {}, {id: "182",_rout ... "})
12. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "182",_rout ... "})
13. /srv/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {id: "182",_rout ... "})
14. /srv/nextcloud/lib/base.php line 997
    OC\Route\Router->match("/apps/maps/tracks/182")
15. /srv/nextcloud/index.php line 42
    OC::handleRequest()

GET /index.php/apps/maps/tracks/182
from fd5b:86e0:557e:0:a06b:e017:9f43:5e07 by alex at 2020-05-12T17:46:24+00:00

Host is x86 32 bit virtual machine with Debian 10 GNU/Linux, webserver is lighttpd, database is MariaDB, native install, no containers. I can share more information, but I'd like to keep the actual .gpx files private. Contact me via E-Mail, if you need those for debugging.

bug

Most helpful comment

I had the same problem

mysql user@IP:nextcloud> use nextcloud                                                                                                                                                                                             
You are now connected to database "nextcloud" as user "root"
Time: 0.001s

mysql user@IP:nextcloud> show columns from oc_maps_tracks like 'metadata'                                                                                                                                                          
+----------+---------------+------+-----+---------+-------+
| Field    | Type          | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+-------+
| metadata | varchar(500) | YES  |     | <null>  |       |
+----------+---------------+------+-----+---------+-------+
1 row in set
Time: 0.009s

mysql user@IP:nextcloud> alter table oc_maps_tracks modify metadata varchar(1000)                                                                                                                                                  
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
Query OK, 0 rows affected
Time: 0.036s

mysql user@IP:nextcloud> select count(*) from oc_maps_tracks\G                                                                                                                                                                     
***************************[ 1. row ]***************************
count(*) | 267
1 row in set
Time: 0.004s

mysql user@IP:nextcloud> select max(length(metadata)) as max_len from oc_maps_tracks\G                                                                                                                                             
***************************[ 1. row ]***************************
max_len | 623
1 row in set
Time: 0.004s`

All 7 comments

same here. gpx file attached below. "Failed to load track content"

[index] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE `oc_maps_tracks` SET `metadata` = ?, `etag` = ? WHERE `id` = ?' with params ["{\"lat\":57.2926618, \"lng\":25.4323515, \"name\": \"P\u0101rg\u0101jiens_RAUNIS_AIZRAUJ_-_STREELNIEKSLV.gpx\", \"distance\": 19880.156, \"duration\": 0, \"begin\": -1, \"end\": -1, \"posel\": 0.00, \"negel\": 0.00, \"minel\": -1000.00, \"maxel\": -1000.00, \"maxspd\": 0.00, \"avgspd\": 0.00, \"movtime\": 0, \"stptime\": 0, \"movavgspd\": 0, \"n\": 57.34465420, \"s\": 57.29266180, \"e\": 25.43643670, \"w\": 25.28165290, \"trnl\": [\"P\u0100RG\u0100JIENA MAR\u0160RUTS_Pirm\u0101 Da\u013ca - Raunis (9,5km)\",\"P\u0100RG\u0100JIENA MAR\u0160RUTS_Otr\u0101 Da\u013ca - Rauna\/C\u0113sis (10,5km)\"], \"lnkurl\": \"\", \"lnktxt\": \"\", \"movpace\": 0.00}", "5d8b6ac666ba161a12261c2cc051416b", 3]:

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'metadata' at row 1 at <<closure>>

 0. /snap/nextcloud/20498/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
 1. /snap/nextcloud/20498/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 1")
 2. /snap/nextcloud/20498/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1063
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE `oc_maps ... ?", {1: "{\"lat\":57 ... 3})
 3. /snap/nextcloud/20498/htdocs/lib/private/DB/Connection.php line 220
    Doctrine\DBAL\Connection->executeUpdate("UPDATE `oc_maps ... ?", ["{\"lat\":57.29 ... 3], [2,2,1])
 4. /snap/nextcloud/20498/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 203
    OC\DB\Connection->executeUpdate("UPDATE `oc_maps ... 4", {dcValue1: "3",d ... 3}, {dcValue1: 1,dcV ... 1})
 5. /snap/nextcloud/20498/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php line 215
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/snap/nextcloud/20498/nextcloud/extra-apps/maps/lib/Service/TracksService.php line 307
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/snap/nextcloud/20498/nextcloud/extra-apps/maps/lib/Controller/TracksController.php line 121
    OCA\Maps\Service\TracksService->editTrackInDB(3, null, "{\"lat\":57.292 ... }", "5d8b6ac666ba161a12261c2cc051416b")
 8. /snap/nextcloud/20498/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Maps\Controller\TracksController->getTrackFileContent("3")
 9. /snap/nextcloud/20498/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Maps\Controller\TracksController {}, "getTrackFileContent")
10. /snap/nextcloud/20498/htdocs/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Maps\Controller\TracksController {}, "getTrackFileContent")
11. /snap/nextcloud/20498/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("TracksController", "getTrackFileContent", OC\AppFramework\ ... {}, {id: "3",_route: ... "})
12. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "3",_route: ... "})
13. /snap/nextcloud/20498/htdocs/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {id: "3",_route: ... "})
14. /snap/nextcloud/20498/htdocs/lib/base.php line 1008
    OC\Route\Router->match("/apps/maps/tracks/3")
15. /snap/nextcloud/20498/htdocs/index.php line 38
    OC::handleRequest()

GET /index.php/apps/maps/tracks/3

track.zip

I have no issue to add you example track from track.zip at nextcloud 18 with mariadb. Added successfully without any error and shown on map.
Please verify that your database is configured as recommended:
https://docs.nextcloud.com/server/18/admin_manual/configuration_database/index.html
Do you see any error at (admin)->settings->overview that are recommended to be fixed?
I don't think that this is a general issue.

track.zip

I have no issue to add you example track from track.zip at nextcloud 18 with mariadb. Added successfully without any error and shown on map.

Me neither, with NC 17, as stated above. So that track is fine, others are not.

Please verify that your database is configured as recommended:
https://docs.nextcloud.com/server/18/admin_manual/configuration_database/index.html

Checked that. Are there any specific MySQL/MariaDB config options to recheck, which might relate to the above error messages?

Do you see any error at (admin)->settings->overview that are recommended to be fixed?
I don't think that this is a general issue.

Nope, everything fine.

Hmm, this is extremely curious, I just checked and the file works for me as well now. All I did was rename it (and zip of course) before uploading here on github. The original still doesn't load however. The weird thing is - renaming the file back to the original name does not produce the error any more. Maybe the problem is caused by some encoding.
I can provide another file which doesn't load on maps (even after renaming, I checked this time :D)
ezeri.zip
Note: this file does not load even after renaming so the problem is not necessarily the filename, maybe just some weird characters in the file header or in waypoints.

Running nextcloud 18.0.4 snap by the way.

I had the same problem

mysql user@IP:nextcloud> use nextcloud                                                                                                                                                                                             
You are now connected to database "nextcloud" as user "root"
Time: 0.001s

mysql user@IP:nextcloud> show columns from oc_maps_tracks like 'metadata'                                                                                                                                                          
+----------+---------------+------+-----+---------+-------+
| Field    | Type          | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+-------+
| metadata | varchar(500) | YES  |     | <null>  |       |
+----------+---------------+------+-----+---------+-------+
1 row in set
Time: 0.009s

mysql user@IP:nextcloud> alter table oc_maps_tracks modify metadata varchar(1000)                                                                                                                                                  
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
Query OK, 0 rows affected
Time: 0.036s

mysql user@IP:nextcloud> select count(*) from oc_maps_tracks\G                                                                                                                                                                     
***************************[ 1. row ]***************************
count(*) | 267
1 row in set
Time: 0.004s

mysql user@IP:nextcloud> select max(length(metadata)) as max_len from oc_maps_tracks\G                                                                                                                                             
***************************[ 1. row ]***************************
max_len | 623
1 row in set
Time: 0.004s`

I can confirm the finding of @jlaunay
Interestingly this issue behave different in my nextcloud 18.0.4.2. I do not see any sql error in nextcloud.log and I was able to see the track after adding it to my nextcloud files. However as soon as I left maps and moved again back to maps this new track was not shown any more and tracks icon keeps loading. I could find an entry in oc_maps_tracks table with truncated metadata due to varchar(500):

{"lat":57.005499, "lng":23.127771, "name": "ezeri-13-seklis-13-km.gpx", "distance": 13490.315, "duration": 16918, "begin": 1578732447, "end": 1578749365, "posel": 138.65, "negel": 152.02, "minel": 69.01, "maxel": 111.90, "maxspd": 15.99, "avgspd": 2.87, "movtime": 12067, "stptime": 4853, "movavgspd": 4.02, "n": 57.02799900, "s": 57.00066600, "e": 23.13050400, "w": 23.07654500, "trnl": ["Ezeri [13] Seklis [13 km]"], "lnkurl": "https://www.wikiloc.com/walking-trails/ezeri-13-seklis-13-km-48201432"

after changed to varchar(1000) as suggested by @jlaunay and removing and re-adding ezeri-13-seklis-13-km.gpx metadata are complete (with length of 569):

{"lat":57.005499, "lng":23.127771, "name": "ezeri-13-seklis-13-km.gpx", "distance": 13490.315, "duration": 16918, "begin": 1578732447, "end": 1578749365, "posel": 138.65, "negel": 152.02, "minel": 69.01, "maxel": 111.90, "maxspd": 15.99, "avgspd": 2.87, "movtime": 12067, "stptime": 4853, "movavgspd": 4.02, "n": 57.02799900, "s": 57.00066600, "e": 23.13050400, "w": 23.07654500, "trnl": ["Ezeri [13] Seklis [13 km]"], "lnkurl": "https://www.wikiloc.com/walking-trails/ezeri-13-seklis-13-km-48201432", "lnktxt": "Ezeri [13] Seklis [13 km] on Wikiloc", "movpace": 14.91}

Now this track is shown in maps correctly more than only one time.

@tacruc , @eneiluj @jancborchardt
I have no experience how to modify size of metadata in oc_maps_tracks for next update of maps and/or new installation of maps. Can someone please have a look?

Seems to be fixed in v0.1.8.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jakobroehrl picture jakobroehrl  Â·  13Comments

vwbusguy picture vwbusguy  Â·  6Comments

jancborchardt picture jancborchardt  Â·  5Comments

Yetangitu picture Yetangitu  Â·  7Comments

mannp picture mannp  Â·  7Comments