Skip to content

Verify 12.4.5b5 fix for L12-BUG-5145 and remove the temp-dir write-grant workaround #1

Description

@madisonrickert

Background

Ableton beta 12.4.5b5 ships this fix:

Extensions SDK: Fixed an issue on macOS where accessing the tempDirectory would sometimes result in an ERR_ACCESS_DENIED exception being thrown.

This is the upstream fix for L12-BUG-5145 (the temp-tree startup race): the Extension Host canonicalizes its --allow-fs-write grant at node startup, but creates .../T/Ableton Extensions a few seconds later, so on the first Live launch after a reboot (macOS empties $TMPDIR on boot) the grant never registers and tempDirectory writes fail with ERR_ACCESS_DENIED until Live is relaunched.

This workaround was ported from the Sheet Music extension (commit 3c7affc, "fix: port the tempDirectory permission-race fallback from Sheet Music").

Workaround to investigate (this repo)

Write-side only (this extension writes to tempDirectory but does not read host-rendered files back, so there is no read-side workaround):

  • src/scratch-dir.ts: resolveScratchDir() and isAccessDenied(). Tries tempDirectory, falls back to storageDirectory/work on ERR_ACCESS_DENIED.
  • src/extension.ts (around line 166): builds the candidate list [tempDir(), storageDir()/work] and writes the UI HTML to whichever resolves.
  • src/scratch-dir.test.ts: reboot fallback test.

Minor: the comment in src/scratch-dir.ts references the internal feedback numbering ("Ableton SDK feedback #10"). If any comment survives the cleanup, switch it to the upstream ID L12-BUG-5145, which is the form used in committed code (the internal numbering is meaningless to outside readers).

Tasks

  • Reproduce the original failure on a build before 12.4.5b5 (reboot Mac, launch Live, open the UI as the first action, confirm the HTML write fails into tempDirectory).
  • Verify the fix on 12.4.5b5: same repro, confirm the tempDirectory write now succeeds on first launch and the storageDirectory/work fallback never fires.
  • Decide whether to remove the workaround. It is a cheap, silent try/catch with no UX cost, so keeping it as defense-in-depth is defensible; per the request, remove resolveScratchDir / isAccessDenied and the fallback wiring if confirmed unneeded.
  • Update / remove src/scratch-dir.test.ts accordingly.
  • If the explanatory comment stays, retag it L12-BUG-5145.
  • Keep this in sync with the Sheet Music extension, since the workaround was shared between them.

Supported-version floor: bumping to 12.4.5b5

Decision: we are bumping the documented supported floor to 12.4.5b5 (the first build that contains the fix), so the fix is present in every supported build and this cleanup is no longer blocked upstream. The README / CLAUDE.md version bump is being done separately.

Note: the b5 fix can't be confirmed from CI. Verifying it needs the manual repro (reboot the Mac, launch Live on 12.4.5b5, open the UI as the first action). Until that passes, treat removal as "unblocked, pending verification."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions