zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.68k stars 202 forks source link

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

Closed juanbretti closed 1 month ago

juanbretti commented 1 month ago

Your environment

SYSTEM INFO:
    Obsidian version: v1.6.0
    Installer version: v1.5.12
    Operating system: Windows 10 Enterprise 10.0.19045
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: on
    Live preview: on
    Base theme: dark
    Community theme: none
    Snippets enabled: 6
    Restricted mode: off
    Plugins installed: 17
    Plugins enabled: 17
        1: Text Format v3.0.3
        2: Omnivore v1.10.3
        3: Dataview v0.5.66
        4: Calendar v1.5.10
        5: Settings Search v1.3.10
        6: Homepage v3.8.0
        7: Text Extractor v0.5.1
        8: Omnisearch v1.22.2
        9: Natural Language Dates v0.6.2
        10: Mind Map v1.1.0
        11: Excalidraw v2.2.2
        12: Git v2.24.2
        13: Tag Wrangler v0.6.1
        14: Tasks v7.2.0
        15: Plugin Update Tracker v1.5.2
        16: Image Converter v1.1.7
        17: Templater v2.3.2

Describe the bug Every other time, I get this error at the console. Also, I get a message at the top right saying "No number after minus sign in JSON at position 1"

To Reproduce Steps to reproduce the behavior: Sadly, I don't have yet the steps to reproduce the error. Just wait, without using Excalidraw. I am not using it, but I do have it installed and enabled.

Expected behavior No error message.

Screenshots

app.js:1 Measure loop restarted more than 5 times
e.measure @ app.js:1
plugin:obsidian-excalidraw-plugin:39 Objecterror: SyntaxError: No number after minus sign in JSON at position 1 (line 1 column 2)
    at JSON.parse (<anonymous>)
    at JSON_parse (plugin:obsidian-excalidraw-plugin:4:2626)
    at eval (plugin:obsidian-excalidraw-plugin:41:7654)
    at ExcalidrawData.loadData (plugin:obsidian-excalidraw-plugin:41:7678)
    at eval (plugin:obsidian-excalidraw-plugin:97:531864)message: "No number after minus sign in JSON at position 1 (line 1 column 2)"stack: "SyntaxError: No number after minus sign in JSON at position 1 (line 1 column 2)\n    at JSON.parse (<anonymous>)\n    at JSON_parse (plugin:obsidian-excalidraw-plugin:4:2626)\n    at eval (plugin:obsidian-excalidraw-plugin:41:7654)\n    at ExcalidrawData.loadData (plugin:obsidian-excalidraw-plugin:41:7678)\n    at eval (plugin:obsidian-excalidraw-plugin:97:531864)"[[Prototype]]: Errorconstructor: ƒ SyntaxError()message: ""name: "SyntaxError"[[Prototype]]: Objectplugin: "Excalidraw"where: "ExcalidrawView.setViewData"[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
errorlog @ plugin:obsidian-excalidraw-plugin:39

image

Additional context This issue started with the last update 2.2.2. I have Obsidian Sync running.

Please, let me know what to try or test. ... and thank you for your time and support.

juanbretti commented 1 month ago

Sorry, I just found the issue. For same reason, the note got the property:

excalidraw-plugin: parsed

And the note did not have any Excalidraw information.