Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Slogger "Exited with code: 1" #222

Open
bjornkri opened this issue Nov 8, 2013 · 16 comments
Open

Slogger "Exited with code: 1" #222

bjornkri opened this issue Nov 8, 2013 · 16 comments

Comments

@bjornkri
Copy link
Contributor

bjornkri commented Nov 8, 2013

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.

@crlvll
Copy link

crlvll commented Nov 14, 2013

Same here.
Mavericks, even reinstalled Slogger.
Script work OK from the command line, but Exited with code: 1 from Launchd

@randomphrase
Copy link
Contributor

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>'

@dombarnes
Copy link
Contributor

Does your launchd plist look a bit like this? #204 (comment)

@randomphrase
Copy link
Contributor

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>

@cobbenterprises
Copy link

I'm having the same issue. Did any body get it going?

@arcterex
Copy link

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

@notverypc
Copy link

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.

@notverypc
Copy link

OK... So I'm not sure how, but the launchd is now working correctly.. Typical!!

@notverypc
Copy link

Hmmm so I had the restart my MacBook and now I get the same error as before..

@randomphrase
Copy link
Contributor

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>

@alanleftofthedot
Copy link

@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 :)

@cobbenterprises
Copy link

@randomphrase Where in the file did you place it? Could you please post a full updated plist for me? Thanks!

@alanleftofthedot
Copy link

@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.

@randomphrase
Copy link
Contributor

@alanleftofthedot Glad that fix worked for you

@cobbenterprises
Copy link

Looks like it's running for me now as well. Thanks for the help!

@notverypc
Copy link

Same here!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants