Opened 11 years ago

Closed 11 years ago

#2373 closed bug (Fixed)

Deluge won't start on OS Mavericks

Reported by: n1g2t3s4 Owned by: Calum
Priority: major Milestone: 1.3.7
Component: Packaging Version: 1.3.6
Keywords: Cc:

Description

Deluge won't start in OS Mavericks (10.9)

Change History (16)

comment:1 by Calum, 11 years ago

Status: newpending

Going to have to provide a lot more detail.

comment:2 by n1g2t3s4, 11 years ago

Is there a log file I can upload? Before upgrading my mac air to Mavericks, Deluge worked fine. After the os update, both 1.35 and 1.36 won't start. When I double click the icon to launch it, it will show up in the dock and bounce a few times, and then simply go away. No error messages. It just won't fire up.

comment:3 by elbryan, 11 years ago

I have uploaded the crash report here and here

comment:4 by Calum, 11 years ago

Really need logs from Deluge (edit deluge.sh) however according to quite a few users it does work on Mavericks, try with fresh config.

Ref tickets #2378, #2380

comment:5 by suprnova32, 11 years ago

In order to get it to start I had to edit the Deluge file under Deluge.app/Contents/MacOS/ as the directory formatting was not providing the correct environment. Once I did that I also needed to delete the ipc/ folder in the config directory in order for the app to boot. The problem now is that it will only start from the command line and not the Application Icon.

comment:6 by Calum, 11 years ago

Can you be more specific about the directory format...

comment:7 by griffin jennings, 11 years ago

how do i configure the directory? I dont even know where to find that.

comment:8 by kicker78, 11 years ago

Thanks to suprnova32 for putting me on the right track. I managed to get mine working as follows: -- Back up the original file /Applications/Deluge.app/Contents/MacOS/Deluge -- Edit /Applications/Deluge.app/Contents/MacOS/Deluge -- Change the bundle line from this: bundle=`dirname "$tmp"`

to this: bundle=!/Applications/Deluge.app/

After that I did need to remove my ~/.config/deluge/ipc directory

It seems that it was trying to launch the application from whichever directory it was launched in. By hardcoding the bundle reference there it always launches it from that same spot. This also allowed me to launch from the dock as well.

Hopefully this workaround works for others as well.

Version 3, edited 11 years ago by kicker78 (previous) (next) (diff)

comment:9 by hwangsta, 11 years ago

I am not sure how to edit the file :/Applications/Deluge.app/Contents/MacOS/Deluge. What program do you use to edit it? Also, could you please add detail on how to find the ipc directory in order to delete it.

Thank you

in reply to:  9 comment:10 by kicker78, 11 years ago

  1. Open Finder.
  2. In the left-hand pane click Applications.
  3. Find Deluge (presumably it is here), hold down your Control key and click it.
  4. Select 'Show Package Contents'.
  5. You will now see a Contents folder in Finder. Expand out Contents > MacOS.
  6. Hold down Control and click on the Deluge file (simply 'Deluge'. None of the others. Make a backup of this file first.)
  7. Open With > Other... and the when the list appears pick TextEdit.
  8. Make the edit suggested above and save the file.

For the ipc folder:

  1. Make sure Deluge isn't running.
  2. Open Utilities and select Terminal.
  3. Type: mv ~/.config/deluge/ipc/ ~/.config/deluge/ipc_old/
  4. ⌘Q to quit the Terminal.

That should be it. Try launching Deluge after making those changes.

Last edited 11 years ago by Calum (previous) (diff)

comment:11 by Calum, 11 years ago

Milestone: Future1.3.7
Owner: set to Calum
Status: pendingassigned

comment:12 by cascade, 11 years ago

It seems to be because of the quarantine flag.

From Console:

1/20/2014 1:13:44.000 PM kernel[0]: exec of /Applications/Deluge.app/Contents/MacOS/Deluge denied since it was quarantined by The\x20Unarchiver and created without user consent, qtn-flags was 0x00000047

And listing the dir:

ls -l /Applications/Deluge.app/Contents/MacOS/
total 96
-rwxr-xr-x@  1 hfp  admin   2350 20 Jan 13:08 Deluge
-rwxr-xr-x@  1 hfp  admin    260  7 Mar  2013 Deluge-bin
-rwxr-xr-x@  1 hfp  admin  12940  7 Mar  2013 Deluge-python
-rwxr-xr-x@  1 hfp  admin   1946 28 Feb  2013 deluge-console
-rwxr-xr-x@  1 hfp  admin    276  7 Mar  2013 deluge-console-bin
-rwxr-xr-x@  1 hfp  admin   1938 28 Feb  2013 deluge-web
-rwxr-xr-x@  1 hfp  admin    268  7 Mar  2013 deluge-web-bin
-rwxr-xr-x@  1 hfp  admin   1939 28 Feb  2013 deluged
-rwxr-xr-x@  1 hfp  admin    262  7 Mar  2013 deluged-bin

If you run this command:

xattr -dr com.apple.quarantine /Applications/Deluge.app/Contents/MacOS/*

The quarantine flag is removed and the app launches successfully. Not sure if this is a MacOS issue or a Deluge issue.

comment:13 by lauhub, 11 years ago

The problem does not come from the quarantine flag: Deluge cannot run if it is removed until modifications made as kicker78 gave them.

Here is some log, when I run :

$ bash -x /Applications/Deluge.app/Contents/MacOS/Deluge

Without modification

+ EXEC=exec
++ basename /Applications/Deluge.app/Contents/MacOS/Deluge
+ name=Deluge
++ pwd
+ [[ /Applications/Deluge.app/Contents/MacOS/Deluge == /Users/lauhub* ]]
+ [[ /Applications/Deluge.app/Contents/MacOS/Deluge == \/\/* ]]
++ pwd
+ full_path=/Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge
++ dirname /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge
+ tmp=/Users/lauhub//Applications/Deluge.app/Contents/MacOS
++ dirname /Users/lauhub//Applications/Deluge.app/Contents/MacOS
+ tmp=/Users/lauhub//Applications/Deluge.app/Contents
++ dirname /Users/lauhub//Applications/Deluge.app/Contents
+ bundle=/Users/lauhub//Applications/Deluge.app
+ bundle_contents=/Users/lauhub//Applications/Deluge.app/Contents
+ bundle_macos=/Users/lauhub//Applications/Deluge.app/Contents/MacOS
+ bundle_res=/Users/lauhub//Applications/Deluge.app/Contents/Resources
+ bundle_lib=/Users/lauhub//Applications/Deluge.app/Contents/Resources/lib
+ bundle_bin=/Users/lauhub//Applications/Deluge.app/Contents/Resources/bin

...

+ exec /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge-python /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge-bin
/Applications/Deluge.app/Contents/MacOS/Deluge: line 80: /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge-python: No such file or directory
/Applications/Deluge.app/Contents/MacOS/Deluge: line 80: exec: /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge-python: cannot execute: No such file or directory

With modification

+ EXEC=exec
++ basename /Applications/Deluge.app/Contents/MacOS/Deluge
+ name=Deluge
++ pwd
+ [[ /Applications/Deluge.app/Contents/MacOS/Deluge == /Users/lauhub* ]]
+ [[ /Applications/Deluge.app/Contents/MacOS/Deluge == \/\/* ]]
++ pwd
+ full_path=/Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge
++ dirname /Users/lauhub//Applications/Deluge.app/Contents/MacOS/Deluge
+ tmp=/Users/lauhub//Applications/Deluge.app/Contents/MacOS
++ dirname /Users/lauhub//Applications/Deluge.app/Contents/MacOS
+ tmp=/Users/lauhub//Applications/Deluge.app/Contents
++ dirname /Users/lauhub//Applications/Deluge.app/Contents
+ bundle=/Users/lauhub//Applications/Deluge.app
+ bundle=/Applications/Deluge.app/
+ bundle_contents=/Applications/Deluge.app//Contents
+ bundle_macos=/Applications/Deluge.app//Contents/MacOS
...
+ exec /Applications/Deluge.app//Contents/MacOS/Deluge-python /Applications/Deluge.app//Contents/MacOS/Deluge-bin

** (deluge:61142): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (deluge:61142): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (deluge:61142): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'

The three last warning are normal: they mean Deluge was correctly executed.

The problem comes from the bundle=dirname "$tmp" assignment which does not set the correct path to bundle variable.

comment:14 by Calum, 11 years ago

Ok I see the issue, it looks like previously //Applications was the path passed to the script but now it's seeing /Applications so simply change the logic as leading // or / are the same.

The fix for line 6:

- if [[ "$0" == `pwd`* ]] || [[ "$0" == "//"* ]]; then
+ if [[ "$0" == `pwd`* ]] || [[ "$0" == "/"* ]]; then

comment:15 by Calum, 11 years ago

Component: ConsolePackaging

comment:16 by Calum, 11 years ago

Resolution: Fixed
Status: assignedclosed

Fixed 1.3-stable: [41f1ad9f5f6]

Note: See TracTickets for help on using tickets.