norio-nomura / EasySIMBL

EasySIMBL is modified "SIMBL" for OS X 10.7, 10.8, 10.9 or 10.10 supporting sandbox, resume. No installer.
818 stars 76 forks source link

Plugins don't update in sandbox containers #14

Open rpendleton opened 10 years ago

rpendleton commented 10 years ago

So I'm not sure if I'm doing something wrong, but I've noticed that if I install a plugin in ~/Library/Application Support/SIMBL/Plugins and start a sandboxed app that uses it, any updates made to a plugin won't be copied to the sandbox until deleted from the container folder. I fixed this by making the SIMBL folder in the container a symbolic link to the normal SIMBL folder, but I'm not sure where to even begin implementing this in the code.

This is the command I ran in terminal:

cd /path/to/container/Library/Application\ Support
ln -s ../../../../../Application\ Support/SIMBL/ SIMBL
norio-nomura commented 10 years ago

I'm aware of this issue while creating other SIMBL plugins. But, I didn't think it happens in daily use. I will check about this issue.

For resolving this issue manually, please try following:

  1. In EasySIMBL, uncheck/check Use SIMBL checkbox. This step will restart SIMBL Agetn.app.
  2. Remove /path/to/container/Library/Application\ Support/SIMBL folder of target sandboxed application
  3. Restart target sandboxed application.

As far as I know, sandbox will not allow accessing symbolic link content from inside of container to outside of container.

rpendleton commented 10 years ago

Hmm.. I happened to be developing a plugin when I noticed this, so I guess it's possible that it only happens then.

If you look at the actual contents of the Container, you'll notice most of the folders are actually symbolic links. For example:

$ cd ~/Library/Containers/com.apple.appstore/Data
$ ls -al
total 48
drwx------  10 rpendleton  staff   340 Oct 28 12:07 .
drwx------   4 rpendleton  staff   136 Oct 28 12:07 ..
lrwxr-xr-x   1 rpendleton  staff    19 Oct 28 12:07 Desktop -> ../../../../Desktop
drwx------   3 rpendleton  staff   102 Oct 28 12:07 Documents
lrwxr-xr-x   1 rpendleton  staff    21 Oct 28 12:07 Downloads -> ../../../../Downloads
drwx------  30 rpendleton  staff  1020 Oct 28 12:09 Library
lrwxr-xr-x   1 rpendleton  staff    18 Oct 28 12:07 Movies -> ../../../../Movies
lrwxr-xr-x   1 rpendleton  staff    17 Oct 28 12:07 Music -> ../../../../Music
lrwxr-xr-x   1 rpendleton  staff    20 Oct 28 12:07 Pictures -> ../../../../Pictures
norio-nomura commented 10 years ago

If you look at the actual contents of the Container, you'll notice most of the folders are actually symbolic links. For example:

I recognized those symbolic links are specially permitted.

On releasing EasySIMBL-1.0, I selected creating hard link of ~/Library/Application Support/SIMBL into container, instead of creating symbolic link. But, sorry, I didn't remember and didn't record the reason why I selected them. :(

I noticed this issue when developing SyncTwitterClient. It has two debug run schemas, which create copy of bundle on Pre-actions, delete bundle on Post-actions. On running both of schemas in parallel, this issue will cause.

nacho4d commented 9 years ago

Hello Nomura-san

Thank you for EasySIMBL! it is great! I was writing a plugin for a sandboxed app and just faced this issue. I wonder if there is any progress on this :)

(I check/uncheck the "Use SIMBL" check box to restart the agent so the new version of my plugin is used)

norio-nomura commented 9 years ago

I have stopped developing my SIMBL plugins since I stopped using Twitter for Mac which was major reason for developing plugins. Now, I don't have motivation for resolving this issue. Sorry for inconvenience.

I may have to create some plugins after Yosemite will be released, but I can't say I will see this issue again.

nacho4d commented 9 years ago

I see, thanks for letting us know. :)

norio-nomura commented 9 years ago

I just released EasySIMBL-1.7.1 containing 524be0c which make more stable detecting termination of sandboxed applications.