apple-notes-common-errors

Diagnose and fix common Apple Notes automation errors. Trigger: "apple notes error".

1,868 stars

Best use case

apple-notes-common-errors is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Diagnose and fix common Apple Notes automation errors. Trigger: "apple notes error".

Teams using apple-notes-common-errors should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/apple-notes-common-errors/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/apple-notes-pack/skills/apple-notes-common-errors/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/apple-notes-common-errors/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How apple-notes-common-errors Compares

Feature / Agentapple-notes-common-errorsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Diagnose and fix common Apple Notes automation errors. Trigger: "apple notes error".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Apple Notes Common Errors

## Overview

Apple Notes automation errors fall into three categories: TCC permission denials from macOS security, AppleEvent communication failures between your script and Notes.app, and iCloud sync issues that cause data inconsistency. Unlike REST APIs that return HTTP status codes, Apple Events use negative OSStatus codes. This guide covers every error you are likely to encounter when automating Notes via JXA or `osascript`, with tested fixes for each.

## Error Reference

| Error | Code | Root Cause | Fix |
|-------|------|-----------|-----|
| Not authorized to send Apple events | -1743 | TCC denied automation permission | System Settings > Privacy > Automation > enable your app |
| AppleEvent timed out | -1712 | Notes.app busy, hung, or not running | `Application("Notes").activate()`; increase timeout with `delay` |
| Can't get application "Notes" | -2700 | Notes.app not installed or renamed | Verify with `mdfind "kMDItemCFBundleIdentifier == com.apple.Notes"` |
| Can't get folder | -1728 | Folder name mismatch (case-sensitive) | List folders first: `Notes.defaultAccount.folders().map(f => f.name())` |
| Connection is invalid | -609 | Notes.app crashed mid-operation | `killall Notes; sleep 2; open -a Notes; sleep 3` |
| User canceled | -128 | Security dialog dismissed or timed out | Re-run and click Allow; or pre-grant via MDM profile |
| Can't make Note | -10000 | Invalid HTML in note body | Validate HTML; strip unsupported tags before creating |
| Application isn't running | -600 | App quit between calls | Wrap in retry with `Application("Notes").activate()` first |

## Diagnostic Script

```bash
#!/bin/bash
echo "=== Apple Notes Diagnostics ==="
echo -n "macOS version: "; sw_vers -productVersion
echo -n "Notes.app running: "; pgrep -x Notes > /dev/null && echo "Yes" || echo "No"
echo -n "Notes.app path: "; mdfind "kMDItemCFBundleIdentifier == com.apple.Notes" 2>/dev/null | head -1
echo -n "Note count: "
osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length' 2>/dev/null || echo "ERROR — check TCC"
echo -n "Folder count: "
osascript -l JavaScript -e 'Application("Notes").defaultAccount.folders.length' 2>/dev/null || echo "ERROR"
echo -n "Accounts: "
osascript -l JavaScript -e 'Application("Notes").accounts().map(a => a.name()).join(", ")' 2>/dev/null || echo "ERROR"
echo -n "iCloud status: "
defaults read MobileMeAccounts Accounts 2>/dev/null | grep -c AccountID || echo "No iCloud"
echo "=== TCC Automation Entries ==="
sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db \
  "SELECT client, allowed FROM access WHERE service='kTCCServiceAppleEvents';" 2>/dev/null || echo "Cannot read TCC.db (SIP)"
echo "=== Done ==="
```

## Common Fixes

```bash
# Reset TCC automation permissions (triggers fresh prompts)
tccutil reset AppleEvents

# Force quit and restart Notes with delay for launch
killall Notes 2>/dev/null; sleep 2; open -a Notes; sleep 3

# Verify Notes is responsive after restart
osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length'

# Force iCloud sync restart
killall bird 2>/dev/null; killall cloudd 2>/dev/null; sleep 5

# Check for stuck iCloud sync
brctl status com.apple.Notes 2>/dev/null || echo "brctl not available"
```

## Retry Wrapper for Transient Failures

```javascript
// Retry pattern for -609, -600, -1712 errors
function withRetry(fn, maxAttempts = 3) {
  for (let i = 0; i < maxAttempts; i++) {
    try { return fn(); }
    catch (e) {
      if (i === maxAttempts - 1) throw e;
      Application("Notes").activate();
      delay(2);
    }
  }
}

// Usage
const count = withRetry(() => Application("Notes").defaultAccount.notes.length);
```

## Error Handling

| Issue | Cause | Solution |
|-------|-------|----------|
| Errors persist after TCC reset | App-specific permission cached | Restart Terminal/IDE after `tccutil reset` |
| iCloud notes show stale data | Sync daemon paused | `killall bird && killall cloudd` to force resync |
| Sandbox prevents database read | SIP protects TCC.db | Use `osascript` to test access instead of direct DB query |
| Script works manually, fails from cron | Cron has no TCC context | Use launchd with `AssociatedBundleIdentifiers` instead |

## Resources

- [Mac Automation Scripting Guide](https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/)
- [Apple TCC Overview](https://support.apple.com/guide/security/controlling-app-access-to-files-secddd1d86a6/web)
- [OSStatus Error Codes](https://www.osstatus.com/)

## Next Steps

For incident response when errors cascade, see `apple-notes-incident-runbook`. For TCC and security hardening, see `apple-notes-security-basics`.

Related Skills

workhuman-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman common errors for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman common errors".

wispr-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow common errors for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr common errors".

windsurf-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Windsurf IDE and Cascade errors. Use when Cascade stops working, Supercomplete fails, indexing hangs, or encountering Windsurf-specific issues. Trigger with phrases like "windsurf error", "fix windsurf", "windsurf not working", "cascade broken", "windsurf slow".

webflow-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Webflow Data API v2 errors — 400, 401, 403, 404, 409, 429, 500. Use when encountering Webflow API errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "webflow error", "fix webflow", "webflow not working", "debug webflow", "webflow 429", "webflow 401".

vercel-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Vercel deployment and function errors. Use when encountering Vercel errors, debugging failed deployments, or troubleshooting serverless function issues. Trigger with phrases like "vercel error", "fix vercel", "vercel not working", "debug vercel", "vercel 500", "vercel build failed".

veeva-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault common errors for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva common errors".

vastai-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Vast.ai common errors and exceptions. Use when encountering Vast.ai errors, debugging failed instances, or troubleshooting GPU rental issues. Trigger with phrases like "vastai error", "fix vastai", "vastai not working", "debug vastai", "vastai instance failed".

twinmind-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix TwinMind common errors and exceptions. Use when encountering transcription errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "twinmind error", "fix twinmind", "twinmind not working", "debug twinmind", "transcription failed".

together-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Together AI common errors for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together common errors".

techsmith-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

TechSmith common errors for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith common errors".

supabase-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Supabase errors across PostgREST, PostgreSQL, Auth, Storage, and Realtime. Use when encountering error codes like PGRST301, 42501, 23505, or auth failures. Use when debugging failed queries, RLS policy violations, or HTTP 4xx/5xx responses. Trigger with "supabase error", "fix supabase", "PGRST", "supabase 403", "RLS not working", "supabase auth error", "unique constraint", "foreign key violation".

stackblitz-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Fix WebContainer and StackBlitz errors: COOP/COEP, SharedArrayBuffer, boot failures. Use when WebContainers fail to boot, embeds don't load, or processes crash inside WebContainers. Trigger: "stackblitz error", "webcontainer error", "SharedArrayBuffer not defined".