Slogger
Slogger copied to clipboard
Slogger "Exited with code: 1"
I mentioned this here, but this seems to be a separate issue since slogger runs fine for me from the command line.
But when I do launchctl start com.bjornkri.Slogger, which contains the exact same command as I run from the command line (/usr/bin/ruby /Volumes/Belbo/Development/personal/Slogger/slogger), I get the following in console:
08/11/13 10:17:22,316 com.apple.launchd.peruser.501[285]: (com.bjornkri.Slogger[49922]) Exited with code: 1
This started happening after upgrading to Mavericks.
Same here. Mavericks, even reinstalled Slogger. Script work OK from the command line, but Exited with code: 1 from Launchd
Same symptoms here. When I run slogger from a remote ssh command line I get the following... Related?
$ ./slogger -t 2
Initializing Slogger v2.1 (2.1.0.6)...
22:19:27 DayOne: =====[ Saving entry to entries/27D08A3345EC4F63BD289762FE27DFEE ]
22:19:27 FacebookIFTTTLogger: Logging FacebookIFTTTLogger posts at /Users/alastair/Dropbox/AppData/ifttt/facebook/facebook.md.txt
/Users/alastair/Library/Slogger/plugins/facebookifttt.rb:87:in `=~': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/alastair/Library/Slogger/plugins/facebookifttt.rb:87:in `block in do_log'
from /Users/alastair/Library/Slogger/plugins/facebookifttt.rb:86:in `each_line'
from /Users/alastair/Library/Slogger/plugins/facebookifttt.rb:86:in `do_log'
from /Users/alastair/Library/Slogger/slogger.rb:257:in `block in run_plugins'
from /Users/alastair/Library/Slogger/slogger.rb:244:in `each'
from /Users/alastair/Library/Slogger/slogger.rb:244:in `run_plugins'
from /Users/alastair/Library/Slogger/slogger.rb:388:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from ./slogger:18:in `<main>'
Does your launchd plist look a bit like this? https://github.com/ttscoff/Slogger/issues/204#issuecomment-28878050
Pretty much:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.brettterpstra.Slogger</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ruby</string>
<string>/Users/alastair/Library/Slogger/slogger</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>23</integer>
<key>Minute</key>
<integer>50</integer>
</dict>
</dict>
</plist>
I'm having the same issue. Did any body get it going?
I'm having a similar issue, tried adding / removing the job to launchctl through the install script a few time, but still get this as soon as I start it:
Dec 23 16:29:38 imac2013 com.apple.launchd.peruser.501217: Exited with code: 1 Dec 23 16:29:38 imac2013 com.apple.launchd.peruser.501217: Throttling respawn: Will start in 10 seconds Dec 23 16:29:49 imac2013 com.apple.launchd.peruser.501217: Exited with code: 1 Dec 23 16:29:49 imac2013 com.apple.launchd.peruser.501217: Throttling respawn: Will start in 10 seconds
I'm also having the same issue...
4/1/2014 11:50:11.366 pm com.apple.launchd.peruser.501[166]: (com.brettterpstra.Slogger[12445]) Exited with code: 1
If I run the command direct in the terminal in runs correctly.
OK... So I'm not sure how, but the launchd is now working correctly.. Typical!!
Hmmm so I had the restart my MacBook and now I get the same error as before..
Just as a data point, it seems that adding the following to the launchd plist seems to fix the problem:
<key>EnvironmentVariables</key>
<dict>
<key>LANG</key>
<string>en_US.UTF-8</string>
</dict>
@randomphrase That might have done it! I'm not going to declare success just yet, but it did just run via launchctl.... I'll make sure it's still running tomorrow though before I throw a random dance party :)
@randomphrase Where in the file did you place it? Could you please post a full updated plist for me? Thanks!
@cobbenterprises mine looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>LANG</key>
<string>en_US.UTF-8</string>
</dict>
<key>Label</key>
<string>com.brettterpstra.Slogger</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ruby</string>
<string>/Users/alan/bin/Slogger/slogger</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>22</integer>
<key>Minute</key>
<integer>30</integer>
</dict>
</dict>
</plist>
<!-- @@@@LingonWhatStart:/usr/bin/ruby /Users/alan/bin/Slogger/slogger@@@@LingonWhatEnd -->
Then I load it in Lingon, load it, save it, and then quit Lingon.
@alanleftofthedot Glad that fix worked for you
Looks like it's running for me now as well. Thanks for the help!
Same here!