Note renderer breaks for HTML

Operating system

OSX Catalina, 10.15.2

Joplin version

Joplin 1.0.177, revision: 6d9f73ee (head of master)

Note: I’m running my build from joplin/ElectronClient/app/dist/mac/Joplin.app, which I built from the head of master, because when I try to run the official latest release downloaded from here I get this error:


I assume I’m getting this because I did a build on master earlier during some development work, and now it doesn’t know how to handle the fact that my db is ahead of the most recent release.

It’s possible that the fact I’m running a weird version is actually the source of the problem, in which case I’d love some guidance on how to get the official release running again.

Problem

When I click into a note where Markup: Markdown, it renders just fine. But when I click into a note where Markup: HTML, it does not render and just freezes to whatever Markdown note was last successfully rendered.

This just started happening this week, so my guess is it has something to do with the extraction of joplin-renderer.

Logs

Here’s the console:

Contemporary lines in log.txt: (I don’t believe these were related)

2020-01-04 18:19:48: "Sync: createRemote: remote does not exist, and local is new and has never been synced: Resource: (Local aa05b595bc114d649033bccbb4ca7fef)"
2020-01-04 18:19:48: "put .resource/aa05b595bc114d649033bccbb4ca7fef", "{"path":"/Users/vonzu/.config/joplin-desktop/resources/aa05b595bc114d649033bccbb4ca7fef.png","source":"file"}"
2020-01-04 18:19:50: "put aa05b595bc114d649033bccbb4ca7fef.md", "null"
2020-01-04 18:19:51: "stat b05b08383063d896f0ba18f54b7a8666.md"
2020-01-04 18:19:52: "Sync: createRemote: remote does not exist, and local is new and has never been synced: Resource: (Local b05b08383063d896f0ba18f54b7a8666)"
2020-01-04 18:19:52: "put .resource/b05b08383063d896f0ba18f54b7a8666", "{"path":"/Users/vonzu/.config/joplin-desktop/resources/b05b08383063d896f0ba18f54b7a8666.png","source":"file"}"
2020-01-04 18:19:53: "put b05b08383063d896f0ba18f54b7a8666.md", "null"
2020-01-04 18:19:54: "stat b41faae80c1e4ef5020bf1e4533b21db.md"
2020-01-04 18:19:55: "Sync: createRemote: remote does not exist, and local is new and has never been synced: Resource: (Local b41faae80c1e4ef5020bf1e4533b21db)"
2020-01-04 18:19:55: "put .resource/b41faae80c1e4ef5020bf1e4533b21db", "{"path":"/Users/vonzu/.config/joplin-desktop/resources/b41faae80c1e4ef5020bf1e4533b21db.jpg","source":"file"}"
2020-01-04 18:19:56: "put b41faae80c1e4ef5020bf1e4533b21db.md", "null"
2020-01-04 18:19:58: "stat b7d718e3c4f61f4783fe6f16d896d5e4.md"
2020-01-04 18:19:58: "Sync: createRemote: remote does not exist, and local is new and has never been synced: Resource: (Local b7d718e3c4f61f4783fe6f16d896d5e4)"
2020-01-04 18:19:58: "put .resource/b7d718e3c4f61f4783fe6f16d896d5e4", "{"path":"/Users/vonzu/.config/joplin-desktop/resources/b7d718e3c4f61f4783fe6f16d896d5e4.png","source":"file"}"
2020-01-04 18:20:00: "put b7d718e3c4f61f4783fe6f16d896d5e4.md", "null"
2020-01-04 18:20:01: "stat ba3d08d69391965ce4876b470c2a7d69.md"

Yes someone reported this on GitHub. Somehow it seems I’ve overlooked testing HTML notes with the new renderer. I assume it’s a quick fix and I plan to fix that soon.

Sweet thanks! One other data point that’s probably just excess, but I might as well share in case it’s helpful:

It works just fine if you copy-paste the same HTML into a new Markdown file. Example:

Since the Markup field isn’t edible, it requires creating a new note. Would you accept a PR that made that editable?

Do you have any idea what this means? (More detail in the OP)

It means that you are using and old version of Joplin with a more recent version of a profile. For example the profile database was upgraded when you used version 1.0.177, and then you went back to use version 1.0.176 (or less). Since the old version doesn’t know about the new database structure, it exits immediately to avoid data corruption.

To fix this, you’ll need to install the latest version you’ve ever used. So maybe 1.0.177?

Or if needed you can manually downgrade your profile database like so:

  • Open database.sqlite in SQLite Browser
  • In the version table, change the version number to 26

With that change it should work with v1.0.176.

1 Like

Ah gotcha. To make sure I understand, you’re saying that the problem is because I inadvertently upgraded by creating a local build that was ahead of the stable release’s database version?

Unfortunately, manually updating the version to 26 didn’t work (so I put it back to 27). And then trying to run the prerelease versions v1.0.176 and v1.0.177 gave me this:

Running my dist from the build does work, so that’s fine for now. In the long term, will future stable versions get to 27 and allow me to start using those stable releases again (and thus get back on the auto-upgrade wagon)?

Yes if you used a local build with your main profile, it must have been upgraded to version 27.

Indeed all new versions will be based on profile version 27. However I don't understand why the application can't be opened at all. For me it works fine with latest v177 so not sure what the issue is.