Some of our users seem to run the app from the dmg file and never move it to their /Applications
folder:
Which may explain why we're seeing this message in our internal logs:
Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
(I visited the GitHub issue but couldn't find anything useful.)
I can definitely reproduce this error message by mounting the dmg, cd into it and run the app from the command line:
# I mounted the dmg and then cd into it, see:
$ pwd
/Volumes/**REDACTED**2.42.0-beta.5
# Then I launched the app from the command line, see:
$ ./**REDACTED**.app/Contents/MacOS/**REDACTED**
Found version 2.42.1-beta.0 (url: **REDACTED**-2.42.1-beta.0.zip, **REDACTED**-2.42.1-beta.0.dmg, **REDACTED**-2.42.1-beta.0.dmg)
Downloading update from **REDACTED**-2.42.1-beta.0.zip, **REDACTED**-2.42.1-beta.0.dmg, **REDACTED**-2.42.1-beta.0.dmg
updater cache dir: /Users/**REDACTED**/Library/Application Support/Caches/**REDACTED**-updater
Update has already been downloaded to /Users/**REDACTED**/Library/Application Support/Caches/**REDACTED**-updater/pending/**REDACTED**-2.42.1-beta.0.zip).
/ requested
[Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.] {
code: 8,
domain: 'SQRLUpdaterErrorDomain'
}
While the app is running, a background process checks for updates. We can see that it has found one and downloaded it. However it couldn't apply it.
We ship regular updates but these users can't get them. I suspect some of them don't even realise that they haven't "properly" installed the app.
Is there a way we can detect that with Electron or Node.js?