Closed krasnoludkolo closed 2 months ago
Building tileserver-gl using an RHEL 9 UBI base container yielded similar results. There are no errors displayed with Xvfb. I also confirmed that the only difference in the node_modules directory from the Ubuntu build was the maplibre-gl-native/lib/node-v115/mbgl.node, which had to be recompiled from source for RHEL 9 GLIBCXX version compatibility. The same error is displayed for both True-Type and PBF Fonts. Tiles without fonts appear to render correctly.
I can confirm that the issue is caused by the latest version of Node. In the upgrade from the 20.14.0 LTS to 20.15.0 LTS the glyph font "combine" function is throwing the above error.
Tracing the issue, I found the line: https://github.com/maptiler/tileserver-gl/blob/master/src/utils.js#L217 which uses the glyph-pbf-composite library to combine font PBF (protocol buffers).
The specific line is in the package: https://github.com/mapbox/glyph-pbf-composite/blob/master/index.js line
messages.glyphs.encode is throwing the exception, and it is directly related to upgrading to Node 20.15.0.
Changing the Dockerfile to reference the 20.14.0 version of node resolves the issue.
Change Lines: https://github.com/maptiler/tileserver-gl/blob/master/Dockerfile#L40 https://github.com/maptiler/tileserver-gl/blob/master/Dockerfile#L99
to read:
apt-get install -y nodejs=20.14.0-1nodesource1; \
Resolves the issue for now.
If anyone can shed some light as to why the 20.15.0 update has caused the issue that would be awesome!
I suspect this may be related to: https://github.com/maptiler/tileserver-gl/issues/1268
I can confirm that the issue is caused by the latest version of Node. In the upgrade from the 20.14.0 LTS to 20.15.0 LTS the glyph font "combine" function is throwing the above error.
Tracing the issue, I found the line: https://github.com/maptiler/tileserver-gl/blob/master/src/utils.js#L217 which uses the glyph-pbf-composite library to combine font PBF (protocol buffers).
The specific line is in the package: https://github.com/mapbox/glyph-pbf-composite/blob/master/index.js line
messages.glyphs.encode is throwing the exception, and it is directly related to upgrading to Node 20.15.0.
Changing the Dockerfile to reference the 20.14.0 version of node resolves the issue.
Change Lines: https://github.com/maptiler/tileserver-gl/blob/master/Dockerfile#L40 https://github.com/maptiler/tileserver-gl/blob/master/Dockerfile#L99
to read:
apt-get install -y nodejs=20.14.0-1nodesource1; \
Resolves the issue for now.
If anyone can shed some light as to why the 20.15.0 update has caused the issue that would be awesome!
Thank you very much!
Can anyone confirm if v4.12.0 fixes this.
I can confirm that with Node 20.15.0, and v4.12.0 the new @jsse/pbfont is functioning as expected, and there are no longer any issues. Thank you all very much!
Confirmed when rebuilding from scratch on RHEL 9. Thanks!
Thanks for confirming everyone. I am going to close this. @krasnoludkolo let me know if this didn't fix your issue and we can re-open this.
I quickly ran new build and looks like it's fine, thanks! If there is anything wrong, I will comment here
Hello. I'm trying to build docker image from source. I'm using:
After I open page, there is no map icon (with preview) and in console I can see:
When I'm using docker image from repository:
everything works fine.
Full log: