zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.22k stars 231 forks source link

BUG: Plugin failure: obsidian-excalidraw-plugin SyntaxError: Invalid or unexpected token #2045

Open Hopsakee opened 1 month ago

Hopsakee commented 1 month ago

Have you searched for existing issues (including closed ones)?

Does this bug persist in a new vault with only Excalidraw installed?

Your environment

SYSTEM INFO: Obsidian version: v1.6.7 Installer version: v1.5.12 Operating system: Windows 10 Enterprise 10.0.19045 Login status: logged in Catalyst license: none Insider build toggle: off Live preview: on Base theme: light Community theme: Minimal v7.7.4 Snippets enabled: 14 Restricted mode: off Plugins installed: 39 Plugins enabled: 27 1: Excalidraw v2.5.0 2: Actions URI v1.6.4 3: Advanced URI v1.44.1 4: Another Quick Switcher v11.6.0 5: Auto Link Title v1.5.4 6: Calendar v1.5.10 7: Dataview v0.5.67 8: Day Planner v0.22.1 9: ExcaliBrain v0.2.15 10: Hypothes.is v0.1.19 11: Media DB v0.7.2 12: Metadata Menu v0.8.7 13: Minimal Theme Settings v8.1.1 14: Natural Language Dates v0.6.2 15: Omnisearch v1.24.1 16: Omnivore v1.10.4 17: Paste image rename v1.6.1 18: Periodic Notes v0.0.17 19: Plugin Update Tracker v1.5.2 20: QuickAdd v1.11.1 21: Quiet Outline v0.3.36 22: Recent Files v1.6.0 23: Style Settings v1.0.9 24: Tasks v7.10.2 25: Templater v2.7.2 26: Vimrc Support v0.10.1 27: Zotero Integration v3.2.1

RECOMMENDATIONS: Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets. Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the bug

Sometimes my excalidraw plugin can't load anymore. I have had this issue now for I think 3 times last month. The only solution I can find is to remove the plugin and re-install. Than it works again for some time, until it doesn't.

I haven't found out how to reproduce it. I turned of all other plugins, doesn't solve this when I already have the error. Might prevent the error from happening, but testing that would ruin my Obsidian workflow for an unknown amount of days, since this error seems to happen at random intervals (which is of course not true, but I must act on what I know ;) ).

I thought this might happen because of syncing between different devices, so I just turned of all syncing of the settings. But even if this solves it, this would I think still be an issue.

I understand this will be extremely hard to debug, since I don't now the exact steps to replicate. So no worries if you won't find time to dive into this one.

If I find any other hints that might solve this, I will of course add them.

Steps to reproduce

  1. Install Excalidraw plugin.
  2. Use Obsidian for some days.
  3. Then one day open Obsidian and get the error message that Excalidraw can't load.
  4. Manually toggle the 'enable' button gives exact same message.

Expected behavior

Excalidraw loads at startup.

Additional context

See the image for the error message I get at startup. To be clear, this is a start-up of Obsidian with all plugins disabled, to get rid of the clutter of 26 other plugins. Next I removed excalidraw and then reinstalled it.

2024-09-27 10_28_32-

zsviczian commented 1 month ago

next time you can click VM20 and 1:45 to see if that reveals anything of significance.

image