ckRobinson / multi-column-markdown

A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.
GNU General Public License v3.0
283 stars 13 forks source link

Error: "Cannot read properties of null" - it don't let last used file open when obisidian starts #113

Open eofferma opened 2 months ago

eofferma commented 2 months ago

Hi,

Thank you for develop this plugin, it's very useful.

I'm getting an error that doesn't let the last used file open when Obsidian starts.:

Captura desde 2024-06-25 14-51-37

When I open the console it shows:

app.js:1 TypeError: Cannot read properties of null (reading 'serialize') at t.getLayout (app.js:1:2255487) at getPreviewLeafFromFilePath (plugin:multi-column-markdown:4193:44) at MultiColumnMarkdown_LivePreview_Widget.toDOM (plugin:multi-column-markdown:4385:24) at t.sync (app.js:1:322514) at e.sync (app.js:1:313021) at t.sync (app.js:1:329284) at e.sync (app.js:1:313021) at app.js:1:354351 at e.ignore (app.js:1:434969) at t.updateInner (app.js:1:354133)

Debug information:

SYSTEM INFO: Obsidian version: v1.6.5 Installer version: v1.6.5 Operating system: #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 6.5.0-41-generic Login status: logged in Catalyst license: none Insider build toggle: off Live preview: on Base theme: light Community theme: AnuPpuccin v1.5.0 Snippets enabled: 10 Restricted mode: off Plugins installed: 42 Plugins enabled: 42 1: Kanban v2.0.51 2: Lock Screen v1.3.0 3: Meld Encrypt v2.3.7 4: Natural Language Dates v0.6.2 5: Recent Files v1.4.1 6: Regex Find/Replace v1.2.0 7: Tasks v7.4.0 8: MetaEdit v1.8.2 9: Google Calendar v1.10.14 10: Local images v0.14.2 11: Copy as HTML v1.1.3 12: Heatmap Calendar v0.7.0 13: Copy document as HTML v0.7.0 14: Paste As Html v1.0.2 15: Relative Line Numbers v3.0.0 16: Mermaid Tools v1.1.3 17: Advanced Cursors v0.5.1 18: Advanced Tables v0.21.0 19: Auto Link Title v1.5.4 20: Calendar v1.5.10 21: Dataview v0.5.67 22: Metatable v0.14.4 23: Outliner v4.8.1 24: Tracker v1.14.0 25: Templater v2.3.3 26: Table of Contents v0.2.0 27: PlantUML v1.8.0 28: Global Search and Replace v0.5.0 29: Restore Tab Key v1.17.0 30: Enhancing Export v1.10.6 31: Kindle v0.0.14 32: Advanced Merger v1.5.0 33: Change Case v2.0.53 34: Remember cursor position v1.0.9 35: Another Quick Switcher v11.5.0 36: Quick Switcher++ v4.2.2 37: Vim Yank Highlight v1.0.8 38: Vimrc Support v0.9.0 39: Navigate Cursor History v1.1.0 40: Git v2.24.3 41: ePub Reader v1.0.2 42: Multi-Column Markdown v0.9.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.

Liamrups commented 1 month ago

I'm also having this exact issue. I have found that this error does not occur if a document with a multi-column has it situated lower down on the document, out of site and not initially rendered upon startup.

i.e. a document with 100 lines of text would not crash if any columns were placed at the end, but would crash if any columns were placed at the beginning.