Create an empty new file and put in any mermaid diagram. For demonstration purposes, an empty one (ticks with “mermaid” and nothing else) works.
Enable the reading view.
Did you follow the troubleshooting guide? [Y/N]
Y
Expected result
I’d like to see the mermaid graph being rendered.
Actual result
One of the following always happens: (1) I see a blank diagram; (2) I see syntax highlighted source code of the mermaid diagram; (3) I see the error message “Error parsing Mermaid diagram! Can’t find variable: mermaid”.
Environment
SYSTEM INFO:
Operating system: ios 16.1.1 (Apple iPad14,4)
Obsidian version: 1.9.14 (241)
API version: v1.9.14
Login status: not logged in
Language: en
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Git v2.35.1
Additional information
I was able to find and test a few older versions of iOS Obsidian. The last version I can find that works is 1.7.7. The first version I can find that has this bug is 1.8.3.
~~~mermaid
sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!
~~~
An empty mermaid code block gives me the error “No diagram type detected matching given configuration for text:”. I don’t know what the expected behavior is in this case, and I’m not sure how much it matters unless there’s some use for empty blocks that I don’t know about.
Hrm, I tried your snippet on another iPad on iPadOS 26 and it simply worked, but on my iPad running iPadOS 16, it simply does not work, even if I reinstall the app to ensure a blank state. I think it may have to do with the OS version. Unfortunately, for personal reasons, I must not upgrade my iPadOS version.
By “does not work,” I mean that, likewise, for your non-empty mermaid diagram, I always see one of the following: (1) I see a blank diagram; (2) I see syntax highlighted source code of the mermaid diagram; (3) I see the error message “Error parsing Mermaid diagram! Can’t find variable: mermaid”.
Hi, yes, I have a few devices supporting up to iOS 15 and updated to the latest iOS 15 on them and it still does not work. Please know that there are many iPhone and iPad models (iPhone 6s (Plus), iPhone SE, iPhone 7 (Plus), iPad Air 2, iPad mini 4, iPod touch 7th generation) that can’t be updated beyond iOS 15 which are nonetheless still perfect devices for reading notes, so fixing support for lower iOS versions helps with that use case.
I have only one iOS 16 device and cannot update iOS for personal reasons, but I do strongly suspect the latest iOS 16 won’t work either, since Apple doesn’t usually make significant web technology changes within the same iOS major version. (I assume you are using web technologies for most things including mermaid rendering given how the desktop Obsidian is an Electron app, but sorry if I’m wrong if the iOS port is not made similarly.) And there are many devices unable to get > iOS 16 too, including iPhone 8 (Plus), iPhone X, iPad Pro 12.9" first generation, iPad Pro 9.7", iPad 5th generation.
I totally understand your priorities and appreciate your work. At least, please just push a fix before you eventually drop support for iOS 16 & below, so as to leave them indefinitely usable rather than forever broken.
Thanks for the idea. On my many iOS 15 and 16 devices, I consistently get “Error 500,” while devices on iOS 17 and above on the same Wi-Fi get no problems.
Yes, these appear to be the same problem. Thanks for figuring out it’s an upstream problem. Some time before you drop support for iOS 15 and 16, please consider doing something like shipping Obsidian with an (additional) older version of mermaid-js and add a toggle “use old mermaid-js for compatibility”.