Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git pull error #96

Closed
one20 opened this issue Aug 24, 2014 · 4 comments
Closed

Git pull error #96

one20 opened this issue Aug 24, 2014 · 4 comments

Comments

@one20
Copy link

one20 commented Aug 24, 2014

Trying to execute a git pull on a remote server using:

NSError *error = nil;
[session.channel execute:@"cd /path/to/repo; git pull;" error:&error];
if(error){
    NSLog([session lastError]);
}

The log shows:
-[NSError length]: unrecognized selector sent to instance 0x608000042f10

If I remove the 'git pull' command, everything runs fine and no errors.

@Frugghi
Copy link
Member

Frugghi commented Aug 24, 2014

Can you post the full stack trace of the crash?

@one20
Copy link
Author

one20 commented Aug 24, 2014

Is this what you need? (Sorry, still pretty new to obj-c/xcode)

2014-08-23 22:48:28.445 Git-Deploy[11219:2007] NMSSH: Exec command cd /home/deploy-test; git pull;
2014-08-23 22:48:29.441 Git-Deploy[11219:303] -[NSError length]: unrecognized selector sent to instance 0x600000242ee0
2014-08-23 22:48:29.442 Git-Deploy[11219:303] -[NSError length]: unrecognized selector sent to instance 0x600000242ee0
2014-08-23 22:48:29.445 Git-Deploy[11219:303] (
    0   CoreFoundation                      0x00007fff8ae7925c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8d049e75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8ae7c12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8add7272 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8add6df8 _CF_forwarding_prep_0 + 120
    5   CoreFoundation                      0x00007fff8ad660a5 __CFStringAppendFormatCore + 101
    6   CoreFoundation                      0x00007fff8ad96263 _CFStringCreateWithFormatAndArgumentsAux + 115
    7   CoreFoundation                      0x00007fff8adcdaeb _CFLogvEx + 123
    8   Foundation                          0x00007fff8d2e8d0c NSLogv + 79
    9   Foundation                          0x00007fff8d2e8c98 NSLog + 148
    10  Git-Deploy                          0x000000010000176b -[AppDelegate connect:] + 923
    11  AppKit                              0x00007fff94f0d260 -[NSApplication sendAction:to:from:] + 327
    12  AppKit                              0x00007fff94f0d0de -[NSControl sendAction:to:] + 86
    13  AppKit                              0x00007fff94f59c4d -[NSCell _sendActionFrom:] + 128
    14  AppKit                              0x00007fff94f73655 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2316
    15  AppKit                              0x00007fff94f72a27 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 487
    16  AppKit                              0x00007fff94f7213d -[NSControl mouseDown:] + 706
    17  AppKit                              0x00007fff94ef3a58 -[NSWindow sendEvent:] + 11296
    18  AppKit                              0x00007fff94e925d4 -[NSApplication sendEvent:] + 2021
    19  AppKit                              0x00007fff94ce29f9 -[NSApplication run] + 646
    20  AppKit                              0x00007fff94ccd783 NSApplicationMain + 940
    21  Git-Deploy                          0x00000001000021a2 main + 34
    22  libdyld.dylib                       0x00007fff8f1cb5fd start + 1
    23  ???                                 0x0000000000000003 0x0 + 3
)

@Frugghi
Copy link
Member

Frugghi commented Aug 26, 2014

Maybe the issue is this part of your code?

if(error){
    NSLog([session lastError]);
}

lastError returns a NSError object. You should change it to:

if (error) {
    NSLog(@"%@", error);
}

@one20
Copy link
Author

one20 commented Sep 16, 2014

That was it. I'm still running into issues but I'm pretty sure it has nothing to do with NMSSH :) Thanks!

@one20 one20 closed this as completed Sep 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants