jigs5460 / simbl

Automatically exported from code.google.com/p/simbl
0 stars 0 forks source link

SIMBL 0.9.9 installs fine but the agent doesn't launch on reboot or login #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the SIMBL 0.9.9. installer 
2. Enter administrator name/pass when asked for

Expected result:
The SIMBL agent is running, and loads SIMBL-plugins when respective 
applications launch. The agent automatically loads after reboot- or 
logout/login cycles.

Actual result:
The agent will run for a limited period of time. It's not exactly clear (yet) 
what causes the agent to quit (or not start!!), but the source of the problem 
appears to be somewhere in the launchd-registration of the Agent, as it will 
never be relaunched after logging-out and back-in (with or without a reboot)

Version/System-info:
SIMBL 0.9.9
Mac OSX 10.6.7 - 10.6.8
– Main (see below)
Xcode 4.0
Build version 4A1006
-Secondary (Xcode 3.2.6 - see below)
XcodeComponent versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
BuildVersion: 10M2518

Notes:
- My machine is used for (Mac OS, iOS) software-development, including some 
SIMBL-plugin development. It is possible the launchd environment for the main 
(arri) user-account differs from that in a standard Mac OS user-account, due to 
development work in the past. This 'should' however not affect the system-level 
launchd environment or that of other user-accounts (e.g. test).
- i have multiple versions of XCode installed. The xcode-info for Xcode 4.0 
(Main) above is the output of the command 'xcodebuild -version'. The info under 
'Secondary' is the output of xcodebuild after issueing 'xcode-select -switch 
/...' to point to another (older) xcode-install (3.2.6) on another partition 
that i'm using sometimes.
- I currently can't easily test things on a another (non-development) machine.

Included files:
Two install-logs, one is from installing SIMBL while logged-into a test-account 
(but installer was authorized using main 'arri' admin-user).

Original issue reported on code.google.com by arritjep...@gmail.com on 11 Jul 2011 at 11:59

Attachments:

GoogleCodeExporter commented 9 years ago
Perhaps relevant documentation. (?)
http://developer.apple.com/library/mac/#documentation/General/Reference/ServiceM
anagementFwRef/ServiceManagement_h/index.html

Appearantly some things around launchd have changed with 10.6.6 

hope this helps…

Original comment by arritjep...@gmail.com on 12 Jul 2011 at 12:23

GoogleCodeExporter commented 9 years ago
Thanks for providing such detailed information.

Unfortunately, I haven't had such a problem. I am on 10.6.7 and things appear 
fine.  Additionally, there have been only one or two reports of this issue. I 
would expect pitchforks and lanterns if it were more widespread.

Perhaps there is something interesting about your account privileges or group 
members (like wheel) that is causing the problem.

Original comment by ms...@gmail.com on 12 Jul 2011 at 6:10

GoogleCodeExporter commented 9 years ago
hmm.. yeah. 
i  was wondering already why it's just me. well, sorry for littering the 
issue-queue.

although the problem appearantly is in my own mess, making the issue 
irrelevant/offtopic, could you still eleborate a bit on those permissions?

i've checked the permissions and group-memberships for my account, and they 
seem perfectly normal. also i can't recall having fiddled with them the past.. 
year(s?). also the permissions on relevant files seem fine (compared to others) 

i understand this is not exactly interesting to you or anyone else, but i'd 
love to get simbl up and running again ;)

Original comment by arritjep...@gmail.com on 13 Jul 2011 at 6:45

GoogleCodeExporter commented 9 years ago
If you create a new account and install there, does it work?

Original comment by ms...@gmail.com on 13 Jul 2011 at 10:24

GoogleCodeExporter commented 9 years ago
i have done that just before initially submitting this issue. one of the 
attached install-logs is acually from an installer-session in that account 
(named 'test').

but i accidentally found what was appearantly causing the problem, which means 
it's fixed ;)
i can't really say that complely understand why things happened the way they 
did.. perhaps later..

i image you would like to know what solved it, what was causing it, and what in 
the end really was the problem.

well, about an hour ago i found that launchd stores 'overrides.plist' files in 
/private/var/db/launchd.db./com.apple.launchd.peruser.XXX/

there are directories for several system users and all (?) real users on the 
machine. 
They all contain an overrides.plist file, but on my machine, these files are 
all empty, except the one for my user-account.

-rw-------  1 arri  wheel    16K Jul 14 09:33 
/private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist

in fact, it's pretty long, and on inspection i found it contained the following 
entry:

<key>net.culater.SIMBL.Agent</key>
<dict>
    <key>Disabled</key>
    <true/>
</dict>

changing the Disabled key to 'false' solved the problem

i haven't figured-out exact yet, what role these overrides.plist files have, 
when they are read or updated.
anyway, it's fixed. thanks for your time.

Original comment by arritjep...@gmail.com on 14 Jul 2011 at 9:35

GoogleCodeExporter commented 9 years ago
I can reproduce this issue each time I reboot using the Lion's "reopen windows 
when logging back in" feature. SIMBL seems not able to reinject itself in 
resume apps on reboot. Quitting and relaunching the apps fix the issue.

I tested with a debug plugin, the load selector isn't even call. Maybe the 
agent starts after resumed apps or something like that.

Original comment by azeit...@gmail.com on 23 Jul 2011 at 10:24

GoogleCodeExporter commented 9 years ago
I got this issues on my Lion as well.
I can reproduce this across 2 Macs I use.  A MacBook Air with clean Lion 
install and an iMac with upgrade from Snow Leopard to Lion. 

Original comment by william....@gmail.com on 24 Jul 2011 at 8:04

GoogleCodeExporter commented 9 years ago
Same issue here in Lion. I can install Safari Omnibar (which uses SIMBL) but it 
always stops working on restart. I'm not a developer but a but of googling led 
me here. 

Original comment by ric.l...@gmail.com on 24 Jul 2011 at 5:21

GoogleCodeExporter commented 9 years ago
i haven't migrated to lion yet, so i can't tell if this has anything to do with 
the  original issue.
but I wouldn't be surprised if it's also launchd-related..
I'll report back if I installed 10.7

Original comment by arritjep...@gmail.com on 25 Jul 2011 at 8:32

GoogleCodeExporter commented 9 years ago
I can also reproduce this issue each time restarting or rebooting running Lion. 
 Quitting and relaunching the apps doesn't fix the issue in the case of 
Maximizer.
( http://chpwn.com/apps/maximizer.html )

A corrective action is to touch a bundle as in using the Maximizer Bundle and 
having a Firefox Application window survive rebooting or restarting and:

CTL-Q Firefox.app  
cd /System/Library/Application Support/SIMBL/Plugins 
touch Maximizer.bundle

And restart Firefox

My /private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist is 
quite short and doesn't contain the key mentioned above.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs
<plist version="1.0">
<dict>
        <key>ca.madefresh.BodegaAgent</key>
        <dict>
                <key>Disabled</key>
                <false/>
        </dict>
        <key>com.apple.FolderActions.enabled</key>
        <dict>
                <key>Disabled</key>
                <false/>
        </dict>
        <key>com.apple.FolderActions.folders</key>
        <dict>
                <key>Disabled</key>
                <false/>
        </dict>
        <key>com.apple.TMLaunchAgent</key>
        <dict>
                <key>Disabled</key>
                <true/>
        </dict>
</dict>
</plist>

The only other non-zero overrides.plist is in com.apple.launchd and doesn't 
contain the key net.culater.SIMBL.Agent (having no key starting with net).

Obtaining a clone of the source for SIMBL (after obtaining a 10.7 built-in 
Python 2.7 linked hg from selenic) and looking through the CHANGES file:

0.9.6 - Fixed installer package now that I have a better understanding of 
how/when LaunchAgents get started. SIMBL Agent now only triggers an inject 
event when it is sure that there is a plugin present for the application that 
just loaded. This should cut down on the admittedly small overhead, but makes 
me feel it's much more efficient.

The problem would seem to be related to the change in 0.9.6.  It sounds like 
Apple doesn't save some state across a reboot/restart in Lion and SIMBL.osax 
doesn't inject or isn't allowed to do so.  The change may have been predicated 
on conditions no longer valid in Lion, though there may be a work around (or a 
permission key somewhere).

There appears to be a fairly steep learning curve for an interested user to be 
able to close in on this issue.

Original comment by diogra...@gmail.com on 27 Jul 2011 at 11:50

GoogleCodeExporter commented 9 years ago
Marking this as done for 10.6.x. There is separate bug for Lion related issues.

Original comment by ms...@gmail.com on 4 Aug 2011 at 10:13

GoogleCodeExporter commented 9 years ago
So, now it looks like Lion's problem will be handled by either issue 13 or 
issue 53.

Original comment by jaeho.shin on 4 Aug 2011 at 2:40