obsidian-common-errors

Featured

Diagnose and fix common Obsidian plugin errors and exceptions. Use when encountering plugin errors, debugging failed operations, or troubleshooting Obsidian plugin issues. Trigger with phrases like "obsidian error", "fix obsidian plugin", "obsidian not working", "debug obsidian plugin".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Obsidian Common Errors ## Overview Diagnostic guide for the six most frequent Obsidian plugin development errors, with root causes and copy-paste fixes. ## Prerequisites - Obsidian plugin development environment set up - Access to Developer Console (Ctrl/Cmd+Shift+I) - Plugin source code access ## Instructions ### Step 1: "Cannot read properties of null" — Workspace Not Ready Accessing `app.workspace.activeLeaf` or `app.workspace.getActiveViewOfType()` before the layout is initialized returns `null`. ```typescript // BROKEN: accessing workspace immediately in onload async onload() { const view = this.app.workspace.getActiveViewOfType(MarkdownView); // TypeError: Cannot read properties of null (reading 'editor') view.editor.replaceSelection('hello'); } // FIXED: wait for layout-ready event async onload() { this.app.workspace.onLayoutReady(() => { const view = this.app.workspace.getActiveViewOfType(MarkdownView); if (view) { view.editor.replaceSelection('hello'); } }); } ``` For commands that need workspace access later (not at load time), guard with a null check: ```typescript this.addCommand({ id: 'my-command', name: 'Do Something', checkCallback: (checking: boolean) => { const view = this.app.workspace.getActiveViewOfType(MarkdownView); if (view) { if (!checking) { // safe to use view.editor here view.editor.replaceSelection('inserted'); } return true; } return false; } }); ``` #...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category