Troubleshooting Appium

Here's what to do if you're experiencing problems, before you submit a ticket to github or write to the appium-discuss discussion group.

General

If you're running Appium.app

If you're running Appium from source

Android

Windows

IOS

center [myCustomView setAccessibilityEnabled:YES];

### Workaround 1 NSLog is a macro and can be redefined. E.g., ```objectivec // You'll need to define TEST or TEST2 and then recompile.

#ifdef TEST #define NSLog(...) _BlackHoleTestLogger(VA_ARGS); #endif // TEST #ifdef TEST2 #define NSLog(...) _StdoutTestLogger(VA_ARGS); #endif // TEST2

void _BlackHoleTestLogger(NSString *format, ...) { // }

void _StdoutTestLogger(NSString *format, ...) { va_list argumentList; va_start(argumentList, format); NSMutableString * message = [[NSMutableString alloc] initWithFormat:format arguments:argumentList];

  printf(message);

  va_end(argumentList);
  [message release];

} ```

### Workaround 2 Manually replace the underlying function that NSLog wraps. This method was recommended by Apple in a similar context.

```objectivec extern void _NSSetLogCStringFunction(void()(const char , unsigned, BOOL));

static void _GarbageFreeLogCString(const char *message, unsigned length, BOOL withSyslogBanner) { fprintf(stderr, "%s\n", message); }

int main (int argc, const char argv[]) { NSAutoreleasePool pool = [[NSAutoreleasePool alloc] init]; int exitCode;

 setbuf(stderr, NULL);

 _NSSetLogCStringFunction(_GarbageFreeLogCString);
 exitCode = WOApplicationMain(@"Application", argc, argv);
 [pool release];
 return exitCode;

} ```

Webview/Hybrid/Safari app support

Let the community know

Once you've tried the above steps and your issue still isn't resolved, here's what you can do:

If you're having trouble getting Appium working and the error messages Appium provides are not clear, join the discussion group and send a message. Please include the following:

If you've found what you believe is a bug, go straight to the issue tracker and submit an issue describing the bug and a repro case.

Known Issues

Specific Errors

Action Error Resolution
Running ios test [INST STDERR] posix spawn failure; aborting launch Your app is not compiled correctly for the simulator or device.
Running mobile safari test error: Could not prepare mobile safari with version '7.1' You probably need to run the authorize script again to make the iOS SDK files writeable. See the UIAutomation Driver