zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.96k stars 213 forks source link

BUG: No number after minus sign in JSON at position 1 #1540

Closed devinat1 closed 8 months ago

devinat1 commented 8 months ago

Your environment SYSTEM INFO: Obsidian version: v1.5.3 Installer version: v1.4.16 Operating system: Windows 10 Home 10.0.23606 Login status: logged in Catalyst license: none Insider build toggle: off Live preview: on Base theme: dark Community theme: Minimal v7.4.7 Snippets enabled: 0 Restricted mode: off Plugins installed: 47 Plugins enabled: 32 1: Admonition v10.1.1 2: Dataview v0.5.64 3: Google Photos v1.6.5 4: Hider v1.3.1 5: Image Toolkit v1.4.1 6: LanguageTool Integration v0.3.6 7: Linter v1.22.0 8: Minimal Theme Settings v7.3.1 9: Note Refactor v1.8.2 10: Obsidian_to_Anki v3.4.2 11: Paste URL into selection v1.7.0 12: Quick Switcher++ v3.3.9 13: Recent Files v1.3.9 14: Templater v2.1.0 15: Text Extractor v0.4.10 16: Todoist Plugin v1.11.1 17: Pandoc Plugin v0.4.1 18: Auto Link Title v1.5.0 19: Plugin Manager v0.1.5 20: Obsidian Enhancing Export v1.9.6 21: Advanced Slides v1.20.0 22: DB Folder v3.5.0 23: Excalidraw v2.0.15 24: Homepage v3.6.0 25: QuickAdd v1.6.1 26: Readwise Official v2.0.1 27: Zotero Integration v3.1.7 28: Citations v0.4.5 29: Editor Syntax Highlight v0.1.3 30: ExcaliBrain v0.2.11 31: Pandoc Reference List v2.0.25 32: Plugin Update Tracker v1.5.2

Describe the bug Getting Syntax error: No number after minus sigh in JSON at position 1

To Reproduce I don't remember how this happened, but it is either related to Excalibrain or when I opened a new workspace layout

Expected behavior No such error shows up

Screenshots image

zsviczian commented 8 months ago

This typically happens when you close Obsidian abruptly and Excalidraw is in midway saving (e.g. your mobile OS freeing up memory and closing tasks in the background), or terminating Obsidian without first closing the drawing, etc.

devinat1 commented 8 months ago

I have changed the save interval to moderate to account for this, but I had made the interval to "Rare" for the following reason: https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/958

zsviczian commented 8 months ago

I keep my Obsidian Desktop save interval @15 minutes as well, however I also press CTRL+S before quitting Obsidian, just to be on the safe side. Unfortunately Obsidian does not await async operations upon app termination. Did the autosave backup work for you? That should give you access at least to the version from the last successful save.

devinat1 commented 8 months ago

Yes this seems to be working thanks.

mochsner commented 1 month ago

@zsviczian is there anyone to be done here if I don't have auto-save / backup?

zsviczian commented 1 month ago

share your md file and I can take a look

mochsner commented 1 month ago

So, turns out I was actually on an older version of excalidraw (2.0.X on the PC this seemed to be failing on.

Worked just fine on my other PC, which made me realize the plug-ins weren't updating on my issue PC and was the likely issue.

Updating to 2.2+ fixed :+1:

zsviczian commented 1 month ago

good to hear! Yes, unfortunately I had to implement some breaking changes to the file structure to meet the changing needs of the plugin. This means that new files will not open with the old plugin... though with only a little tweak they can be made to work... but updating all devices is the best approach.