Page MenuHomePhabricator

Load map file in non-strict mode
Closed, ResolvedPublic


We shouldn't be loading the map file in strict mode, because this causes errors with fonts. The cause is the same as and the fix is

We should be calling [Map.fromString]( somewhere from within the bowels of our code, and need to pass strict : false as part of the options.

Searching through node_modules, this is called by one of mapnik-pool, tilelive-vector, or tilelive-bridge

Event Timeline

I'm going to trim down the brighmed font list to match what we have. We should still be in non-strict mode, but this is a quicker way to get to working.

Strict mode is on by default in tilelive-vector as of 0.4.0. Rather than being configurable as a query parameter, it's intended to be toggled module-wide as a mutable export:

To force it via [tilelive-modules](

diff --git i/loader.js w/loader.js
index 2920730..013bb1f 100644
--- i/loader.js
+++ w/loader.js
@@ -19,6 +19,9 @@ module.exports = function(tilelive, options) {
     try {
+      if (name === "tilelive-vector") {
+        mod.strict = false;
+      }
       if (typeof(mod.registerProtocols) === "function") {
       } else {
Pnorman triaged this task as Medium priority.Jul 3 2018, 4:14 PM
Mholloway reopened this task as Open.

I suppose I should keep this open until we can deploy to prod.

Mentioned in SAL (#wikimedia-releng) [2018-09-27T07:38:16Z] <mdholloway> deployment-maps04 updated tilerator and kartotherian node modules (T195513, T200594)

Change 853236 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/services/kartotherian@mapnik-3.1] Disable strict mode on vector lib

Change 853236 merged by jenkins-bot:

[mediawiki/services/kartotherian@mapnik-3.1] Don't load maps in strict mode in tilelive-vector