Skip to content

Detect read-only volume on startup and warn user before app crashes #2098

@charlesvien

Description

@charlesvien

Problem

When the app is launched from a read-only volume (typically via macOS App Translocation when opened from Downloads), several things go wrong:

  • Auto updater fails with Cannot update while running on a read-only volume (see Squirrel.Mac#182)
  • Starting a task on local crashes the application (black screen)
  • Starting a task on cloud yields no response

The app path in logs shows the translocation hint:

/private/var/folders/yf/.../AppTranslocation/C6283C3C-9D6E-4D81-A7D5-8BA2567ED486/d/PostHog Code.app/...

The user only realised the issue after Charles spotted the auto-update error in the logs. There is no in-app signal that the app is in a broken state.

Expected behavior

On startup, detect that the app bundle is on a read-only or translocated volume and surface a clear message to the user, for example a blocking dialog asking them to move the app to /Applications and relaunch. The app should not silently proceed into a state where local tasks crash and cloud tasks hang.

Steps to reproduce

  1. Download PostHog Code and open it directly from the Downloads folder (or any location that triggers macOS App Translocation).
  2. Try to start a task locally. The app crashes to black.
  3. Try to start a task on cloud. No response.
  4. Check main.log for the read-only volume error from the auto updater.

Notes

  • Workaround: drag the app to /Applications and relaunch.
  • Detection idea: check whether the directory containing the app bundle is writable, or whether the bundle path contains AppTranslocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions