LaTeX Images not showing

Steps to reproduce

Write -$$1$$-
Navigate to a different bullet point

Expected result

I expect to see -1- (where the 1 in the middle is rendered as LaTeX)

Actual result

I see image
image

Environment

Iā€™m using the Dynalist Desktop App for Windows, Iā€™ve reproduced this in browser on Windows + Ubuntu (Chrome and Midori), on desktop for Ubuntu & Windows and on the Android app

No third party scripts


Additional information

I get this bug for all LaTeX code.

If the code is invalid, itā€™s left as $$INVALID CODE$$ rather than becoming blank

Sometimes it happens in one version of Dynalist but not others, eg desktop Ubuntu but not browser Ubuntu, sometimes it happens everywhere. Sometimes when I load the document, all the images are there, but when I navigate to the bullet and then off it, the images in that bullet vanish.

Iā€™ve been using documents with a lot of LaTeX in them, eg https://dynalist.io/d/KYlJxLFVwhf9CIBQRWWYVPbl , but this happens even in an empty document.

Sometimes closing and reopening Dynalist fixes it, sometimes it doesnā€™t


Additional comments

Do you see any errors in the developer consoles when they donā€™t show up?

Huh, I do, thanks! Looks like there was a syntax error ($$\Q$$, but any syntax error replicates the effect).

I can now reproduce the effect - when I make a syntax error, that line is displayed as \Q and LaTeX still works fine. But when I refresh the page, that line is displayed as a blank space, and it looks like KaTeX gets stuck. The LaTeX code above it renders, the code below doesnā€™t, and if I write new LaTeX code or edit other code, they remain as blank spaces. The developer console reports ParseErrors, and sometimes run time errors.

Iā€™ve now managed to patch the problem for now by going through and fixing all of the syntax errors manually, thanks so much for the help!

Specifically the runtime error is ā€œ29Unchecked runtime.lastError: The message port closed before a response was received.ā€

Ah I see. I think I have an idea whatā€™s happening here. Will see how I can fix it!

Iā€™ve made a fix for this - specifically it should now render in red when you write something thatā€™s not recognized: image

Nice, this both seems to resolve the problem, and has instantly made debugging LaTeX go from being a bit of a pain to being notably nicer than in regular LaTeX editors!

Thanks so much :slight_smile:

1 Like