GPX files throw Leaflet error for GeoMaps
State: Triagegeo-map
### Description
I recently updated my install and found that my GeoMaps are no longer able to visualise GPX files. Whenever I import a GPX file and then switch back to its parent GeoMap note, the frontend renders the base map without the GPX data and the Developer Console throws `TypeError: I.GPX is not a constructor.`
I have tested this on a fresh install and with Safe Mode on - the error persists. I've tried with various GPX files, confirmed to be valid/usable.
I have invoked hateful computer-assisted thinking to ensure that I wasn't missing something; I am forced to agree with an LLM's conclusion that "The leaflet-gpx plugin is either missing from the frontend webpack bundle, or failing to bind to the minified Leaflet object (I) due to a module scoping issue during the build process."
System: OSX 15.7.7 (24G720) (Sequoia), with an Apple M2 Max chip.
<img width="1212" height="746" alt="Image" src="https://github.com/user-attachments/assets/e12bbf94-3281-4c0f-b6c1-d7de46ed7a28" />
### TriliumNext Version
0.103.0
### What operating system are you using?
macOS
### What is your setup?
Local + server sync
### Operating System Version
OSX 15.7.7 (24G720) (Sequoia)
### Error logs
When I import the GPX file, the Dev Console throws the following:
```Refused to set unsafe header "cookie"
send | @ | jquery.module-z0Ig-8vR.js:4
-- | -- | --
| ajax | @ | jquery.module-z0Ig-8vR.js:4
| o | @ | import-C426ww2P.js:1
| await in o | |
| onSubmit | @ | layout_commons-tNIV6Gmi.js:203
| onSubmit | @ | Modal-Dk3Wl80T.js:1
| (anonymous) | @ | hooks.module-5xe-uC6c.js:1
```
Developer console logs:
```content_renderer-CoENEE63.js:2 22:41:37 Uncaught error: Message: Uncaught TypeError: I.GPX is not a constructor, URL: http://_redacted_/src/hooks.module-5xe-uC6c.js, Line: 1, Column: 10706, Error object: {}, Stack: TypeError: I.GPX is not a constructor
at Object.__ (http://_redacted_/src/geomap-B5tV72G6.js:2:21426)
at J (http://_redacted_/src/hooks.module-5xe-uC6c.js:1:13890)
at Array.some (<anonymous>)
at Se (http://_redacted_/src/hooks.module-5xe-uC6c.js:1:13590)
logError$1 @ content_renderer-CoENEE63.js:2
hooks.module-5xe-uC6c.js:1 Uncaught TypeError: I.GPX is not a constructor
at Object.__ (geomap-B5tV72G6.js:2:21426)
at J (hooks.module-5xe-uC6c.js:1:13890)
at Array.some (<anonymous>)
at Se (hooks.module-5xe-uC6c.js:1:13590)
```
Backend logs:
```
...
22:41:37.604 JS Error: Uncaught error: Message: Uncaught TypeError: I.GPX is not a constructor, URL: http://_server_/src/hooks.module-5xe-uC6c.js, Line: 1, Column: 10706, Error object: {}, Stack: TypeError: I.GPX is not a constructor
at Object.__ (http://_server_/src/geomap-B5tV72G6.js:2:21426)
at J (http://_server_/src/hooks.module-5xe-uC6c.js:1:13890)
at Array.some (<anonymous>)
at Se (http://_server_/src/hooks.module-5xe-uC6c.js:1:13590)
Stack: Error
at Object.logError$1 [as logError] (http://_server_/src/content_renderer-CoENEE63.js:2:143168)
at M.window.onerror (http://_server_/src/glob-haLui6ra.js:1:35113)
22:41:37.607 200 GET /api/notes/YeXOqp4Doqg3 with 337 bytes took 0ms
22:41:37.629 200 GET /api/notes/Y0Hv12wHMcDn with 331 bytes took 0ms
...
23:01:06.136 200 GET /api/note-map/_options/backlink-count with 11 bytes took 0ms
23:01:17.919 200 GET /api/app-info with 320 bytes took 0ms
23:01:17.951 JS Error: Uncaught error: Message: ResizeObserver loop completed with undelivered notifications., URL: http://_server_/#root/_hidden/_options?ntxId=2NHqaq&hoistedNoteId=_options, Line: 0, Column: 0, Error object: null, Stack: null
Stack: Error
at Object.logError$1 [as logError] (http://_server_/src/content_renderer-CoENEE63.js:2:143168)
at M.window.onerror (http://_server_/src/glob-haLui6ra.js:1:35113)
23:01:37.856 Sending message to all clients: {"type":"sync-push-in-progress","lastSyncedPush":609861}
23:01:37.857 Sync h6jT4K1kqN: Pushing 2 sync changes in 928ms
23:01:37.859 Nothing to push
...
```
关闭于 2026-06-26 2 条评论