client icon indicating copy to clipboard operation
client copied to clipboard

Unable to modify autostart on mac

Open TheOneRing opened this issue 2 years ago • 11 comments

Launch on login seems to be active on mac independent of the user settings/ disabling has no effect.

TheOneRing avatar Jun 15 '22 11:06 TheOneRing

The client restarted again and again after a crash.

TheOneRing avatar Jun 15 '22 11:06 TheOneRing

Temporary work-around: edit ~/Library/LaunchAgents/com.owncloud.desktopclient.plist and change the value for RunAtLoad to false like this:

        <key>RunAtLoad</key>
        <false/>

The client restarted again and again after a crash.

Yes, on purpose. But we can turn this off in the launchd plist file. Currently it's set as:

        <key>KeepAlive</key>
        <dict>
                <key>Crashed</key>
                <true/>
                <key>SuccessfulExit</key>
                <false/>
        </dict>

Launch on login seems to be active on mac independent of the user settings/ disabling has no effect.

erikjv avatar Jun 17 '22 16:06 erikjv

I tried to reproduce this with my own build of master (not installed, but run from QtCreator), and I cannot reproduce this. Which build should I use, or do I need to install it into /Applications?

erikjv avatar Jun 17 '22 16:06 erikjv

Temporary work-around: edit ~/Library/LaunchAgents/com.owncloud.desktopclient.plist and change the value for RunAtLoad to false like this:

        <key>RunAtLoad</key>
        <false/>

The client restarted again and again after a crash.

Yes, on purpose. But we can turn this off in the launchd plist file. Currently it's set as:

        <key>KeepAlive</key>
        <dict>
                <key>Crashed</key>
                <true/>
                <key>SuccessfulExit</key>
                <false/>
        </dict>

Launch on login seems to be active on mac independent of the user settings/ disabling has no effect.

The issue was a crash on startup and no chance to kill it...

TheOneRing avatar Jun 21 '22 09:06 TheOneRing

Hmm it was auto starting the client in my dev env. Changes to image Had no effect the client was started again after login.

TheOneRing avatar Jun 21 '22 09:06 TheOneRing

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>KeepAlive</key>
	<dict>
		<key>Crashed</key>
		<true/>
		<key>SuccessfulExit</key>
		<false/>
	</dict>
	<key>Label</key>
	<string>com.owncloud.desktopclient</string>
	<key>Program</key>
	<string>/Users/hannah/ownbuild/master/downloads/git/owncloud/build-owncloud-client-ownBuild-Debug/bin/owncloud.app/Contents/MacOS/owncloud</string>
	<key>RunAtLoad</key>
	<false/>
</dict>
</plist>                                                                    

As it fails to load a lib it will try to restart again and again and again. All the time the checkbox for start at launch isn't even checked.

TheOneRing avatar Jul 01 '22 08:07 TheOneRing

Ok, can you see what happens when you set the Crashed value to <false/>?

erikjv avatar Jul 07 '22 14:07 erikjv

Then it stopps, but if its in a crashing loop it might overwrite the file before I'm able to change it.

TheOneRing avatar Jul 07 '22 14:07 TheOneRing

With a fresh install it is also impossible to enable autostart.

TheOneRing avatar Aug 10 '22 13:08 TheOneRing

Once that PR is merged, remove ~/Library/LaunchAgents/com.owncloud.desktopclient.plist, then it will get re-created at the next start.

erikjv avatar Sep 13 '22 11:09 erikjv

Enabling also doesn't work :P

TheOneRing avatar Sep 13 '22 11:09 TheOneRing

This was fixed after merging 245047d40b40260c1c7dcbfe8bb48a4a848ab2b1

erikjv avatar Nov 04 '22 16:11 erikjv

Test steps:

  1. enable autostart, then restart your Mac: Should start automatically

  2. disable autostart, then restart your Mac: Should not start automatically

HanaGemela avatar Nov 11 '22 11:11 HanaGemela

Passed on mac 3.0.0 beta1

HanaGemela avatar Nov 11 '22 11:11 HanaGemela

we also need to test migration clean mac (VM), install 2.11 update to 3.0 see wheter autostart persisted

Test with the next daily build

HanaGemela avatar Nov 14 '22 08:11 HanaGemela

Test failed

  1. Install 2.11.1, make sure Start on login is checked
  2. Update to 3.0.0.9153-daily20221122

Start on login is not checked after the update.

HanaGemela avatar Nov 22 '22 10:11 HanaGemela