Squirrel.Mac
Squirrel.Mac copied to clipboard
Application becomes translocated after auto-update
I have recently discovered that our Electron app is not properly installed at the /Applications
directory after auto-update. The app does exist in the Applications directory, however it is still translocated.
Steps followed:
Install app via drag-and-drop in Finder to /Applications
Launch app with update available (app is not translocated)
Close application, Squirrel/ShipIt installs the new version (overwriting in the directory /Applications
)
Launch updated app, app is translocated
This unfortunately causes future updates to not occur, as the app ends up running from a read-only disk image due to translocation.
The underlying cause of this issue seems to be related to using the rename(2)
system call in installItemToURL
to move the application from the temp directory back to /Applications
.
$ sudo dtruss -a -s -t rename -n ShipIt
29632/0x846c5: 165237 268 157 rename("/var/folders/vh/yqwtvs497p7bd0tn091h0c180000gn/T/com.keepersecurity.passwordmanager.ShipIt.y1qHRve4/Keeper Password Manager.app\0", "/Applications/Keeper Password Manager.app\0") = 0 0
I have the same question.
How did you solve this problem
I have the same question.
The problem I encountered has been resolved in this PR. https://github.com/electron/electron/pull/36130