question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mathjax rendering doesn't work on self-hosted instances of drawio docker image.

See original GitHub issue

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug Mathjax rendering doesn’t work since major 20.0.0 release upgrade on self-hosted instances of drawio docker image.

To Reproduce Steps to reproduce the behavior:

  1. Install self-hosted docker image of drawio tag >=20.0.0
  2. Create, open a file.
  3. Check Menu–>Extras–>Mathematical Typesetting tick is on
  4. Add text or rectangle with any Latex mat code, e.g. $$\alpha^2$$
  5. Actually it’s remained unrendered… image

Expected behavior image

draw.io version (In the Help->About menu of the draw.io editor):

  • Tried different versions: 20.2.5, 20.2.6, 20.0.3

Logs of docker container

root@4606b9ece5e6:/usr/local/tomcat# cat logs/localhost_access_log.2022-11-07.txt
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET / HTTP/1.1" 200 13349
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /styles/grapheditor.css HTTP/1.1" 200 50988
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /js/PreConfig.js HTTP/1.1" 200 1413
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /js/app.min.js HTTP/1.1" 200 7815751
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /mxgraph/css/common.css HTTP/1.1" 200 4325
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /js/PostConfig.js HTTP/1.1" 200 252
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /resources/dia.txt HTTP/1.1" 200 43499
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /favicon.ico HTTP/1.1" 200 15086
172.221.0.3 - - [07/Nov/2022:13:53:22 +0000] "GET /math/startup.js HTTP/1.1" 404 770

Last line reports Error 404 for “GET /math/startup.js HTTP/1.1” 404

Analysis hosting-your-own-copy-of-the-mathjax-components tells that need to move content of es5 folder to <path-to-server-location>/math however it still remained in es5, it can be checked in a recent tag codebase: https://github.com/jgraph/drawio/tree/v20.5.3/src/main/webapp/math/es5

Seems that main application doesn’t use local instances of mathjax from webapp/math folder rather gets it directly from a CDN on the web… Thus there is no such issue on local app or on global server instance.

Workaround Inside a container move all contents from webapp/math/es5/* to upper level webapp/math:

docker exec -it self-contained_drawio_1 mv webapps/draw/math/es5/* webapps/draw/math

Proposed Solution Repeat moving content of es5 folder in jgraph/drawio codebase or if for some reason it is still necessary to keep es5 folder then add es5 content moving command to https://github.com/jgraph/docker-drawio/blob/dev/main/Dockerfile

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
m-mohamedincommented, Dec 12, 2022

Will be fixed in the next release. Thanks

Still not fixed in 20.6.2…

I’ve tried and it works. Can you please send us detailed steps to reproduce

1reaction
m-mohamedincommented, Nov 10, 2022

Will be fixed in the next release. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mathjax rendering doesn't work on self-hosted instances of drawio ...
To Reproduce Steps to reproduce the behavior: Install self-hosted docker image of drawio tag >=20.0.0; Create, open a file. Check Menu-->Extras-->Mathematical ...
Read more >
mathjax inline formulas doesn't work when draw.io diargamm ...
Hello! I uses mathjax from CDN. When I embed in my webpage draw.io diagram like below, inline formulas stopped to work.
Read more >
QuickLaTeX - Pavel Holoborodko
QuickLaTeX will render them into image such that text on the picture and on the page ... I tried using the open and...
Read more >
End of Life/Removed Release Logs - Learnosity Reference
Fixed a bug in the case where Question content was too wide for the container it is in, it would overlap and break...
Read more >
Mozilla Firefox Release Notes
Firefox Bug Fixes ; Update about:permissions to allow editing per site 3rd party cookie prefs · Fix the implementation of launch() when there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found