Posted on 05-09-2017 04:09 PM
It seems we can no longer just replace Cyberduck app via a simple DMG package from Composer.
When we try replacing version 4.9.1 with 5.x, or version 5.x with 6.x using this method, the app launches for a second and then quits.
If we install it manually onto a computer that had preferences and bookmarks from the previous version, it doesn't open the main window, or bookmarks can't be clicked on. If we downgrade the app back to the previously installed version, everything works again.
Has anyone else seen this behavior and know of a fix?
Cyberduck.io support has not been very helpful beyond recommending to download the latest version.
Posted on 05-09-2017 04:53 PM
For what it's worth I have a Cyberduck 5.1.0.20872 DMG that seems to work fine.
It's just the app in the Applications folder, the only thing I can think of is check and proprogate the ownership / permissions in composer, in case there is something in causing the issue.
Posted on 05-09-2017 05:12 PM
Still on JSS 9.97 using Composer 9.97 and have not had this problem at all. I package up Cyberduck the same way and I just deployed 6.0.0 today--no issues seen on my unit under test nor reports from users.
Posted on 05-09-2017 05:18 PM
@itupshot we ran into a similar problem with Skype. I think Composer was adding things to the app bundle and not necessarily replacing the entire app bundle. This would end up corrupting the Skype app and it wouldn't properly launch. What we ended up having to do was delete the app before we install the new version. There are a number of different ways to accomplish this. A couple ways to do this would be to use a preinstall script as part of your package or a before script as part of your policy.
Edit: We were creating a .pkg installer rather than a .dmg so the behavior may not be the same.
Posted on 05-09-2017 05:58 PM
@mpermann Is correct that DMG deployments place files, if there are additional files in the location not included in the DMG then they will be retained, if for some reason these are referenced by the new copy (i.e. plugins and such that may be auto launched) then this can occassionally cause problems.
Removing first then redeploying is a good idea.
Posted on 05-09-2017 08:11 PM
Hopefully you're deploying the free version, and not the $23.99 paid version from Apple App Store. :)
Download from their site: https://cyberduck.io/changelog/
Drop the drag install into your choice of packaging tools, and add a preinstall and a postinstall script...yea that means go with PKG format. ;)
preinstallation script:
#!/bin/bash
PROCESSES=("Cyberduck")
APPLICATION="/Applications/Cyberduck.app"
# Kill the process
for PROC in "${PROCESSES[@]}"; do
RUNNING_PROCESSES=$(ps axc | grep -i "$PROC" | awk '{print $1}')
if [[ $RUNNING_PROCESSES ]]; then
echo "Found running process $PROC with PID: ${RUNNING_PROCESSES}. Killing it..."
kill $RUNNING_PROCESSES
else
echo "$PROC not found running..."
fi
done
# Remove the application
/bin/rm -rf "$APPLICATION" 2> /dev/null
exit 0
postinstallation script:
#!/bin/sh
over500=$( dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }' )
APPLICATION="/Applications/Cyberduck.app"
# Remove Quarantine flag, not needed if app is owned by root:wheel
/usr/bin/xattr -r -d com.apple.quarantine /Applications/"$APPLICATION"
# Set User Template
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck SUHasLaunchedBefore true
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck SUSendProfileInfo 0
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck SUEnableAutomaticChecks false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck defaulthandler.reminder false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.crossftp false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.expandrive.ExpanDrive3 false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.extendmac.Flow false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.fetchsoftworks.Fetch false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.nolobe.interarchy false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.panic.Transmit false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.de.filezilla false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck bookmark.import.org.mozdev.fireftp false
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck donate.reminder.date 1525199616000
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck donate.reminder 5.4.4
/usr/bin/defaults write /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck update.check false
/bin/chmod -R 700 /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck.plist 2>/dev/null
/usr/sbin/chown root:wheel /System/Library/User Template/English.lproj/Library/Preferences/ch.sudo.cyberduck.plist 2>/dev/null
## Set existing users
for u in $over500 ;
do
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck SUHasLaunchedBefore true
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck SUSendProfileInfo 0
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck SUEnableAutomaticChecks false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck defaulthandler.reminder false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.crossftp false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.expandrive.ExpanDrive3 false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.extendmac.Flow false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.fetchsoftworks.Fetch false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.nolobe.interarchy false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.com.panic.Transmit false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.de.filezilla false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck bookmark.import.org.mozdev.fireftp false
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck donate.reminder.date 1525199616000
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck donate.reminder 5.4.4
/usr/bin/defaults write /Users/"$u"/Library/Preferences/ch.sudo.cyberduck update.check false
/bin/chmod -R 700 /Users/"$u"/Library/Preferences/ch.sudo.cyberduck.plist 2>/dev/null
/usr/sbin/chown "$u" /Users/"$u"/Library/Preferences/ch.sudo.cyberduck.plist 2>/dev/null
done
exit 0
The usual thanks to all the coding heroes on this forum we stole bits and pieces from...hope this is paying it forward.
PS, this was done for 5.4.4, which was just released. Not going anywhere near 6.0.0 until everyone's wounds heal. :D
HTH,
Don
Posted on 06-01-2017 08:59 AM
@mpermann @Look I added a "before" script to my update policy that removes the existing app. I haven't had a chance to try it yet, but I think you're right.
@donmontalvo Yeah, we're using the one from the website, not App Store.
Posted on 06-02-2017 07:50 AM
FWIW, Cyberduck has an Autopkg recipe. :)
Posted on 10-30-2017 09:09 AM
Many thanks to @donmontalvo and @mpermann (I was also having the issue with Skype, as well as Cyberduck), was able to successfully install both!