Opened 8 years ago

Closed 8 years ago

#2373 closed bug (Fixed)

Deluge won't start on OS Mavericks

Reported by: n1g2t3s4 Owned by: Cas
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 Changed 8 years ago by Cas

  • Status changed from new to pending

Going to have to provide a lot more detail.

comment:2 Changed 8 years ago by n1g2t3s4

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 Changed 8 years ago by elbryan

I have uploaded the crash report here and here

comment:4 Changed 8 years ago by Cas

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 Changed 8 years ago by suprnova32

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 Changed 8 years ago by Cas

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

comment:7 Changed 8 years ago by gjennings

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

comment:8 Changed 8 years ago by kicker78

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.

Last edited 8 years ago by kicker78 (previous) (diff)

comment:9 follow-up: Changed 8 years ago by hwangsta

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

comment:10 in reply to: ↑ 9 Changed 8 years ago by kicker78

  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 8 years ago by Cas (previous) (diff)

comment:11 Changed 8 years ago by Cas

  • Milestone changed from Future to 1.3.7
  • Owner set to Cas
  • Status changed from pending to assigned

comment:12 Changed 8 years ago by cascade

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 Changed 8 years ago by lauhub

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 Changed 8 years ago by Cas

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 Changed 8 years ago by Cas

  • Component changed from Console to Packaging

comment:16 Changed 8 years ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed 1.3-stable: [41f1ad9f5f6]

Note: See TracTickets for help on using tickets.