Upgraded to Xcode 4.5, now I can't run my app from AppCode - AMDeviceValidatePairing error?

It runs fine from Xcode, but when I try to run from AppCode I get the following:

failed starting debugserver. Reason: AMDeviceValidatePairing failed with err = -402653139(Could not send a message to the device.)

/Users/nathanbrown/Library/Caches/appCode10/DerivedData/<snip>

Invalid target

Process finished with exit code 0


I've tried rebooting the iPhone and the Mac.
Any ideas? I'm stuck back in Xcode at the moment, which is not where I want to be!

More info:
I'm developing on an iPhone 4 running iOS 6.  Incidentally, Xcode seems to take a very long time to run the app once building is finished... don't know if this could be anything to do with it? Some sort of time out?
Here's the trace from the log:

2012-10-03 15:28:26,243 [1346877]   WARN - brains.cidr.execution.debugger - failed starting debugserver. Reason: AMDeviceValidatePairing failed with err = -402653139(Could not send a message to the device.)
com.intellij.execution.ExecutionException: failed starting debugserver. Reason: AMDeviceValidatePairing failed with err = -402653139(Could not send a message to the device.)
 at com.jetbrains.cidr.execution.ExecutionResult.get(ExecutionResult.java:38)
 at com.jetbrains.cidr.execution.debugger.IPhoneDebugProcess$5.run(IPhoneDebugProcess.java:225)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:619)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:613)
 at com.intellij.util.concurrency.QueueProcessor$1$1.run(QueueProcessor.java:84)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:81)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:78)
 at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:203)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:200)
 at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148)
Caused by: com.jetbrains.cidr.execution.deviceSupport.AMDeviceException: failed starting debugserver. Reason: AMDeviceValidatePairing failed with err = -402653139(Could not send a message to the device.)
 at com.jetbrains.cidr.execution.deviceSupport.AMDevice.throwNSError(AMDevice.java:94)
 at com.jetbrains.cidr.execution.deviceSupport.AMDevice.startDebugserver(AMDevice.java:146)
 at com.jetbrains.cidr.execution.deviceSupport.AMDeviceUtil.doInstallAndStartDebugserver(AMDeviceUtil.java:56)
 at com.jetbrains.cidr.execution.deviceSupport.AMDeviceUtil.installAppBundleAndStartDebugserver(AMDeviceUtil.java:38)
 at com.jetbrains.cidr.execution.deviceSupport.AMDeviceUtil$2.run(AMDeviceUtil.java:82)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:472)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:181)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:221)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:172)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:381)
 ... 8 more
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - Assertion failed:  
java.lang.Throwable
 at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:98)
 at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:105)
 at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.launch(LLDBDriver.java:288)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$12.run(OCDebugProcess.java:396)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:619)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:613)
 at com.intellij.util.concurrency.QueueProcessor$1$1.run(QueueProcessor.java:84)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:81)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:78)
 at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:203)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:200)
 at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148)
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - JetBrains AppCode 1.6.1  Build #OC-121.238
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - JDK: 1.6.0_35
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - VM: Java HotSpot(TM) 64-Bit Server VM
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - Vendor: Apple Inc.
2012-10-03 15:28:26,266 [1346900]  ERROR - brains.cidr.execution.debugger - OS: Mac OS X
2012-10-03 15:28:26,267 [1346901]  ERROR - brains.cidr.execution.debugger - Last Action: Run
2012-10-03 15:28:26,281 [1346915]   WARN - brains.cidr.execution.debugger - Invalid target
com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBEntityNotValidException: Invalid target
 at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$ThrowIfNotValid.throwIfNeeded(LLDBDriver.java:140)
 at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.launch(LLDBDriver.java:302)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$12.run(OCDebugProcess.java:396)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:619)
 at com.jetbrains.cidr.execution.debugger.OCDebugProcess$MyCommandProcessor.consume(OCDebugProcess.java:613)
 at com.intellij.util.concurrency.QueueProcessor$1$1.run(QueueProcessor.java:84)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:81)
 at com.intellij.util.concurrency.QueueProcessor$1.consume(QueueProcessor.java:78)
 at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:203)
 at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:226)
 at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:200)
 at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148)

6 comments

Nathan, try removing ~/Library/Developer/Xcode/iOSDeviceSupport folder.
Does it help?

0

Hi Anton, thanks for the suggestion but unfortunately not, makes no difference whatsoever I'm afraid.

0

Please try the build from http://youtrack.jetbrains.com/issue/OC-5453.

If it doesn't help, edit AppCode.app/Contents/Info.plist file and add the following code:
 

<log4j:configuration ...

  <!-- this code should be placed right before <root> tag -->
  <category name="#com.jetbrains.cidr.execution.debugger">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-ALL"/>
  </category>

  <category name="#com.jetbrains.cidr.execution.deviceSupport.AMDeviceManager">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-ALL"/>
  </category>

  <category name="#com.jetbrains.cidr.execution.ocunit">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-ALL"/>
  </category>

  <root...
</log4j:configuration>
 

then restart AppCode and try to reproduce the problem. After that, create a bug report in the tracker and attach log file (Help | Reveal Log in Finder)
0

Thanks Anton.  Is there supposed to be a link to a build in that Issue? As I can't see one.
Also, looking at the Info.plist, there doesn't seem to be a place to put the code you sent - no existing <log4j:configuration> or <root> tag
Sorry.

0

My mistake - you need to edit AppCode.app/bin/log.xml file.
I've reattached the link to the issue as well, you need to be a registered user to see it.

0

Thanks Anton.  Unfortunately the test build doesn't fix it.
I've created an issue OC-5520 and attached the log.

Hope this helps.

0

Please sign in to leave a comment.