Squirrel.Mac icon indicating copy to clipboard operation
Squirrel.Mac copied to clipboard

Application becomes translocated after auto-update

Open jhohiselkeeper opened this issue 3 years ago • 4 comments

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

jhohiselkeeper avatar Sep 28 '20 18:09 jhohiselkeeper

I have the same question.

XRenSiu avatar Nov 15 '21 17:11 XRenSiu

How did you solve this problem

taozi922 avatar Jul 19 '22 07:07 taozi922

I have the same question.

beyondkmp avatar Mar 26 '23 02:03 beyondkmp

The problem I encountered has been resolved in this PR. https://github.com/electron/electron/pull/36130

beyondkmp avatar Apr 10 '23 15:04 beyondkmp