Cannot call method 'drain' of undefined
Version 4c6fa1c on Ubuntu 14.04
[Core] File roads.mss changed on disk
[Core] File roads.mss changed on disk
[Core] File roads.mss changed on disk
[Core] File roads.mss changed on disk
[Core] File roads.mss changed on disk
[httpserver] /repo/poll/ 200
[Core] Loading project from /home/pnorman/osm/openstreetmap-carto/repo/project.yaml
[Core] Loading project from /home/pnorman/osm/openstreetmap-carto/repo/project.yaml
[Core] Loading project from /home/pnorman/osm/openstreetmap-carto/repo/project.yaml
[Core] Loading project from /home/pnorman/osm/openstreetmap-carto/repo/project.yaml
[Core] Loading project from /home/pnorman/osm/openstreetmap-carto/repo/project.yaml
[Local Config] Patched config from /home/pnorman/osm/openstreetmap-carto/repo/localconfig.json
/home/pnorman/osm/kosmtik-3/src/back/ProjectServer.js:270
self.mapPool.drain(function() {
^
TypeError: Cannot call method 'drain' of undefined
at Array.0 (/home/pnorman/osm/kosmtik-3/src/back/ProjectServer.js:270:22)
at null.<anonymous> (/home/pnorman/osm/kosmtik-3/src/back/StateBase.js:27:43)
at null.<anonymous> (/home/pnorman/osm/kosmtik-3/src/back/StateBase.js:37:13)
at DataSourceLoader.patchMML (/home/pnorman/osm/kosmtik-3/src/plugins/datasource-loader/index.js:36:15)
at null.<anonymous> (/home/pnorman/osm/kosmtik-3/src/back/StateBase.js:35:74)
at done (/home/pnorman/osm/kosmtik-3/src/plugins/local-config/index.js:14:23)
at /home/pnorman/osm/kosmtik-3/src/plugins/local-config/index.js:52:13
at /home/pnorman/osm/kosmtik-3/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:76:16
at fs.js:268:14
at /home/pnorman/osm/kosmtik-3/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:42:10
Which NodeJS version? Any project?
osm-carto, nodejs v0.10.25 (Ubuntu 14.04 LTS)
Do you have the error with all projects or only this one? Are you still on mapnik 3.4.7?
Do you have the error with all projects or only this one?
It's intermittent, so hard to say.
Are you still on mapnik 3.4.7?
Yes
I've been seeing this error when a project file fails to load due to invalid yaml, then i change the file to make it valid, and it auto-reloads again.
I've been seeing this error when a project file fails to load due to invalid yaml, then i change the file to make it valid, and it auto-reloads again.
If Kosmtik reloads the project file while it's being saved, it might get an invalid YAML file. If you truncate the file at a random place you'll normally get valid YAML, but there are some quoted strings that might result in something invalid.
Doesn't look like it's related to YAML. I got this when I had invalid MSS, fixed it, then hit reload on the web interface. Autoreload was off.
I've been seeing this error when a project file fails to load due to invalid yaml, then i change the file to make it valid, and it auto-reloads again.
This happens with both MSS and YAML. The general sequence is to have a syntax error (e.g. missing }), start Kosmtik, then fix the error. When it auto-reloads it encounters this.