julien-nc / gpxpod

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

Not working any longer #58

Open der-schultze opened 1 month ago

der-schultze commented 1 month ago

Since last update, application is not starting in my nextcloud instance (version 30.0.0). Nothing happen, I see just the wallpaper.

julien-nc commented 1 month ago

I need more details. Is there any error in the browser logs (F12 -> console tab)? Are there any failing network requests (F12 -> network tab)?

der-schultze commented 1 month ago

Hello Julien, I found this:

Content-Security-Policy: Ignorieren von "blob:" innerhalb script-src-elem: 'strict-dynamic' angegeben gpxpod Content-Security-Policy: Die Einstellungen der Seite haben das Laden einer Ressource (media-src) auf data: blockiert, da sie gegen folgende Direktive verstößt: "media-src 'self' blob:" gpxpod GET https://ardbeg/nextcloud/apps/notifications/js/notifications-main.mjs?v=28a019f3-49 NS_ERROR_CORRUPTED_CONTENT GET https://ardbeg/nextcloud/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=28a019f3-49 NS_ERROR_CORRUPTED_CONTENT Loading failed for the module with source “https://ardbeg/nextcloud/apps/notifications/js/notifications-main.mjs?v=28a019f3-49”. gpxpod:34:158 Loading failed for the module with source “https://ardbeg/nextcloud/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=28a019f3-49”. gpxpod:38:149 Initializing unified search plugin-filters from talk search.js:22:9 session heartbeat polling started

GET https://ardbeg/nextcloud/apps/notifications/js/notifications-main.mjs?v=28a019f3-49 404 Not Found GET https://ardbeg/nextcloud/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=28a019f3-49 404 Not Found GET https://ardbeg/nextcloud/avatar/ms/64/dark?v=5 0 GB (0 GB Größe)

I hope this helps. Maybe I should change from nginx to apache?

Thanks, Michael

julien-nc commented 1 month ago

It seems to be indeed an issue on your webserver that cannot serve .mjs files. It does not serve the ones from the notifications app as well.

I'm pretty sure nginx is able to serve those files. It's most likely a configuration issue. I can't help much on this side but now you know what to look for.

julien-nc commented 1 month ago

Or it looks like the same issue as the one fixed by https://github.com/nextcloud/assistant/pull/139 in the assistant app. Do you have the Talk app enabled? Anyway I'll include something that can fix this in the next GpxPod release which is coming soon.

julien-nc commented 1 month ago

v7.0.1 is out. I'm interested to know if it makes things better on your side.

SteveDinn commented 1 month ago

I've ust installed this app for the first time (v7.0.1). I've added a folder that has a single .gpx file in it, GpxPod sees the folder and the folder was the correct size in the browse window, but it says there are no files in it. The files app begs to differ :)

Any suggeestions? I am the admin of the nextcloud instance, but I've never had to debug anything before. Suggestions are appreciated.

freibadschwimmer commented 3 weeks ago

I seem to have the same problem. gpxpod isn't showing any maps anymore since a couple of weeks (that is, then I first encountered the issue).

When trying to load for example the Openstreetmaps as background layer, I get the following errors in the browser console:

Content-Security-Policy: Die Einstellungen der Seite haben das Laden einer Ressource (media-src) auf data: blockiert, da sie gegen folgende Direktive verstößt: "media-src 'self' blob:" my.nextcloud.com

Object { stack: "S@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:2:34855\nHe@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:1026\nI@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:6041\n", message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", config: {…}, request: XMLHttpRequest, response: {…}, status: 404 } gpxpod-vueGpxpod.mjs:4744:39924 loadDirectory https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744

Object { stack: "S@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:2:34855\nHe@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:1026\nI@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:6041\n", message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", config: {…}, request: XMLHttpRequest, response: {…}, status: 404 } gpxpod-vueGpxpod.mjs:4744:39924

Error: AJAXError: (404): /apps/gpxpod/maptiler/maps/openstreetmap/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL Li https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 Qr https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 m https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 MaplibreMap-1Q_5vAPn.chunk.mjs:3:10651

When I try to open a background map from a tileserver I added in the gpxpod admin interface, i also get plenty of the following errors:

Content-Security-Policy: Die Einstellungen der Seite haben das Laden einer Ressource (connect-src) auf https://tileserver.tld/some.jpg blockiert, da sie gegen folgende Direktive verstößt: "connect-src 'self' blob: https://turn.my-domain.com:443 https://stun.nextcloud.com:443 wss://signaling.my-domain.com https://api.certificate24.com/ https://www.certificate24.com/ https://*.openstreetmap.org https://server.arcgisonline.com https://*.tile.thunderforest.com https://stamen-tiles.a.ssl.fastly.net https://tiles.stadiamaps.com https://api.maptiler.com https://tileserver.tld" collaborate.my-domain.com

as well as plenty of errors like this:

TypeError: NetworkError when attempting to fetch resource. MaplibreMap-1Q_5vAPn.chunk.mjs:3:10651 fire https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 fire https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 fire https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 _loadTile https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 f https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 (Async: promise callback) _ https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 p https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 p https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 _loadTile https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 _addTile https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 _updateRetainedTiles https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 update https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 _updateSources https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 _render https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 triggerRepaint https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 (Async: promise callback) triggerRepaint https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 _update https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 Map https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 fire https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:3 setTerrain https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 _load https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 loadJSON https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 (Async: promise callback) loadJSON https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:4 _updateStyle https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 setStyle https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579

https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 initMap https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 mounted https://my.nextcloud.com/apps/gpxpod/js/MaplibreMap-1Q_5vAPn.chunk.mjs:579 lt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 tt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 insert https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 Bt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 s https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 _update https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 r https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 get https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 run https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 ea https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 be https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 fn https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 (Async: promise callback) Kt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 be https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 $nextTick https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 handler https://my.nextcloud.com/apps/gpxpod/js/index.esm--sqSFV7E.chunk.mjs:2 lt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2

and this

Object { stack: "S@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:2:34855\nHe@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:1026\nI@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:6041\nEventHandlerNonNull*Xr</<@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:6110\nXr<@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:4:5442\nSe@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:6:510\n_request@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:7:1206\nrequest@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:6:1865\nK.prototype[e]@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:7:1508\nCe/<@https://my.nextcloud.com/apps/gpxpod/js/index-BbtOUKPa.chunk.mjs:2:1819\nloadDirectory@https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744:38964\nbeforeMount/<@https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744:31367\nbeforeMount@https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744:31285\nlt@https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2:23737\ntt@https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2:32271\nZi@https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2:30581\nF.prototype.$mount@https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2:74776\n@https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744:59491\nEventListener.handleEvent*@https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744:59415\n", message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", config: {…}, request: XMLHttpRequest, response: {…}, status: 404 } gpxpod-vueGpxpod.mjs:4744:39924 loadDirectory https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744 (Async: promise callback) loadDirectory https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744 beforeMount https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744 beforeMount https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744 lt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 tt https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 Zi https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2 $mount https://my.nextcloud.com/apps/gpxpod/js/preload-helper-C2O67VLD.chunk.mjs:2

https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744 (Async: EventListener.handleEvent) https://my.nextcloud.com/apps/gpxpod/js/gpxpod-vueGpxpod.mjs?v=4e3a12eb-59:4744

Does my webserver block mjs file? After looking at this issue https://github.com/nextcloud/server/issues/42989 I tried curl -I https://your.nextcloud.tld/apps/settings/js/esm-test.mjs

and get

HTTP/2 200 strict-transport-security: max-age=63072000; includeSubDomains; preload referrer-policy: no-referrer x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-permitted-cross-domain-policies: none x-robots-tag: noindex, nofollow x-xss-protection: 1; mode=block last-modified: Thu, 07 Nov 2024 06:37:48 GMT etag: "e8-6264cdf6b8700" accept-ranges: bytes content-length: 232 vary: Accept-Encoding cache-control: max-age=15778463 content-type: text/javascript date: Fri, 08 Nov 2024 15:14:50 GMT server: Apache/2.4.62 (Debian)

So mjs should be served, also other apps or activities work fine. The only issue I notice in my NC instance is that in Gpxpod the maps are not getting served anylonger. Tracks are still being printed, just only on a white background.

I am currently running NC 30.0.2 and gpxpod 7.0.4