Finder plugin don't find the syncdaemon executable

Bug #1156793 reported by José Expósito
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Triaged
Undecided
Unassigned
dirspec
Triaged
Undecided
Unassigned

Bug Description

The OS X Finder plugin <https://lists.launchpad.net/ubuntuone-users/msg00764.html> is loaded as a bundle that is injected in the Finder process to modify this behavior.

When it try to find the Ubuntu One Syncdaemon executable, it fails, because the Finder bundle is not inside the "Ubuntu One.app" bundle (really it is the "Finder.app" bundle). For this reason I have added to the "ubuntuone-client/ubuntuone/syncdaemon/utils.py" the path of the installed "Ubuntu One.app" to the fallback directories on this branch:
https://code.launchpad.net/~jose-exposito89/ubuntuone-client/FinderPlugin/+merge/153710

In addition, when the plugin is bundled, the fallback directories are never used in "dirspec/dirspec/utils.py". For this reason I have changed the condition to check it on this branch:
https://code.launchpad.net/~jose-exposito89/dirspec/FinderPlugin/+merge/153711

Tags: u1-notrack
Changed in ubuntuone-client:
assignee: nobody → José Expósito (jose-exposito89)
status: New → Fix Committed
Changed in dirspec:
assignee: nobody → José Expósito (jose-exposito89)
status: New → Fix Committed
dobey (dobey)
Changed in dirspec:
status: Fix Committed → In Progress
Changed in ubuntuone-client:
status: Fix Committed → In Progress
Julien Funk (jaboing)
tags: added: u1-notrack
Revision history for this message
José Expósito (jose-exposito89) wrote :

Hi Mike!

> Do you know why the test getattr(sys, 'frozen', None) is giving us None here?
> I built your bundle from your github repo using a recent py2app, and it has a
> boot script that does set sys.frozen = 'macosx_plugin'.

It looks like getattr(sys, 'frozen', None) is returning 'macosx_plugin' as expected.

> Ideally what should happen here is that when called from the finder bundle,
> _get_exe_path_frozen_darwin is called, and that should be where we find the
> main app bundle, either by looking at __file__ or if that doesn't work, some
> other way.

"__file__" is set to "/Library/ScriptingAdditions/U1 Finder Injector.osax/Contents/Resources/U1FinderLib.bundle/Contents/Resources/lib/python2.7/site-packages.zip/dirspec/utils.pyc"

And "_get_exe_path_frozen_darwin" returns "/Library/ScriptingAdditions/U1 Finder Injector.osax/Contents/Resources/U1FinderLib.bundle/Contents/Resources/lib/python2.7/site-packages.zip/dirspec/utils.pyc/Contents/Resources/UbuntuOne Syncdaemon.app/Contents/MacOS/ubuntuone-syncdaemon"

Basically, the U1 Finder plugin has 3 components: the *injector*, that loads the *bundle* in the Finder process and the *U1 Python library*, used to comunicate with the Ubuntu One Sync Daemon.

The problem is that the *U1 Python library*, that executes "_get_exe_path_frozen_darwin" & company, is not able to find the Ubuntu One Sync Daemon exe, because it is not into the Ubuntu One bundle.
Changing the deploy dirs, and putting this library in "/Applications/Ubuntu One.app/Contents/Resources/U1FinderLib.bundle" fixes the problem without make any change in the Ubuntu One source code.

For the moment I have problems finding the *U1 Python library* from the *bundle* and I'm using a hardcoded path. I have problems too deploying the *U1 Python library*, because it uses QtCore.so and this has a reference to "@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore" that is not correct.

I'm going to close this branch and the ubuntuone-client branch.

How it is supposed to be distributing the Finder Plugin? Separate installer or with Ubuntu One? I can make an installer, but probably, distribute the plugin inside of the Ubuntu One bundle and extract the required files at first launch, could be the easiest way to the user...

dobey (dobey)
Changed in dirspec:
status: In Progress → Triaged
Changed in ubuntuone-client:
status: In Progress → Triaged
assignee: José Expósito (jose-exposito89) → nobody
Changed in dirspec:
assignee: José Expósito (jose-exposito89) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.