Bug 655 - Failure on uploading app to device running iOS5 B7
Summary: Failure on uploading app to device running iOS5 B7
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
: 1662 2037 ()
Depends on:
Blocks:
 
Reported: 2011-09-06 15:04 UTC by Dean Cleaver
Modified: 2012-01-09 08:39 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Dean Cleaver 2011-09-06 15:04:47 UTC
I get this error when I try to upload an app to a device running iOS5 B7. Sometimes it will work immediately after being powered on, however will not work again. Recently, it won't even work immediately after power on.

Unhandled Exception: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000af>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x0036f>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003d>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000d>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000c5>
at MTouch.Main (string[]) <0x032d1>

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000af>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x0036f>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003d>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000d>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000c5>
at MTouch.Main (string[]) <0x032d1>

The application was terminated by a signal: SIGHUP
Comment 1 Sebastien Pouliot 2011-09-06 16:15:58 UTC
* does it happen only for one application ? or for every application ?

* can you run, from a terminal, the following command

/Developer/MonoTouch/usr/bin/mtouch --logdev

then proceed to upload the application. Once it fails then copy/paste the output of the terminal into the bug report (or attachment).

Thanks!
Comment 2 Dean Cleaver 2011-09-06 18:36:12 UTC
Sorry - I tried it with 2 applications, happens with both.

And that command does nothing - I upload, and nothing at all appears in the terminal.
Comment 3 Sebastien Pouliot 2011-09-06 19:04:57 UTC
nothing ? as in "nothing is ever printed" ? or nothing useful is printed ?

You should see something like:

imac:tools sebastienpouliot$ /Developer/MonoTouch/usr/bin/mtouch --logdev
========================
ASL is here to serve you
> 
Sep  6 16:32:37 unknown CommCenter[34] <Notice>: No more assertions for PDP context 0.  Returning it back to normal.
Sep  6 16:32:37 unknown CommCenter[34] <Notice>: Scheduling PDP tear down timer for (337034257.889422) (current time == 337033957.889430)
...

with a lot of noise and (hopefully) some output when the error occurs.
Comment 4 Dean Cleaver 2011-09-06 19:08:30 UTC
Nothing as in it waits a second or two, and then the command prompt returns on a new line. I tried it with just - instead of --, tried it with and without MonoDevelop running at the time - no dice. This is my command window:

Last login: Sat Aug 27 16:52:30 on console
Dean-Cleavers-MacBook-Pro:~ deancleaver$ 
Last login: Sun Sep  4 09:26:07 on console
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --logdev
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --logdev
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch -logdev
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch -logdev
Dean-Cleavers-MacBook-Pro:~ deancleaver$ 


My level of expertise on Mac/'nix extends to being able to operate the power button - sorry.
Comment 5 Sebastien Pouliot 2011-09-06 20:11:31 UTC
Weird, please try both:

/Developer/MonoTouch/usr/bin/mtouch --version

and

/Developer/MonoTouch/usr/bin/mtouch --listdev

Thanks!
Comment 6 Dean Cleaver 2011-09-06 20:13:28 UTC
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --version
mtouch 4.0.6.0
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --listdev
: 
Dean-Cleavers-MacBook-Pro:~ deancleaver$ 

:)
Comment 7 Sebastien Pouliot 2011-09-06 20:16:52 UTC
MonoTouch does not detect any connected device. One is connected, right ? 
I really hope beta7 does not break everything :-o
Comment 8 Dean Cleaver 2011-09-06 20:19:17 UTC
Sorry - no it wasn't. I didn't realise that command needed connected devices :s Device was connected when the original commands were issued though I think :s

Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --version
mtouch 4.0.6.0
Dean-Cleavers-MacBook-Pro:~ deancleaver$ /Developer/MonoTouch/usr/bin/mtouch --listdev
Dino’s iPhone: b1c9a9e4017cc5f2a2e2116242c90d8e39a6cbc2
: 
Dean-Cleavers-MacBook-Pro:~ deancleaver$
Comment 9 Sebastien Pouliot 2011-09-06 20:27:07 UTC
The line with a lone ':' should not be there (phantom device?) even when no device are connected. 

I wonder if --logdev connects to this 'shadow' device - and if the upload issue... uho, what's in MonoDevelop's "Deploy to Device" pad when you try to upload your app ?
Comment 10 Nic Wise 2011-09-07 08:50:34 UTC
OK, at Sebastian's request, I'm adding some more to this.

I've had this problem in iOS5 b4,5,6 and 7. It's mostly transient, and usually caused when I have WIFI synching on on the phone.

If I do an OTA update of iOS5 (from b6 to b7 for example), it's often worse / more common. That said, the OTA updates in iOS5 are fairly unstable: I've had the database of music remain, but no tracks will play, massive battery drain and other instability when using a phone which was upgraded over the air, and once I back it up, restore from a downloaded ipsw (from developer.apple.com), and restore the backup, it all works fine again.

My usual solution is to unplug the phone, plug it back in, then redeploy. It usually works immediately.

I suspect it's due to the sync service on the phone, or whatever the thing which moves stuff from itunes/MT to the phone, gets stopped, killed or reset without notice. At a guess, the phone starts it up, finds itunes for a wifi sync, does the sync, then after a while, kills the sync process, which happens to be the process MT is using to push builds onto the phone.

Hence plugging the phone into the USB cable (well, unplug-then-plug) fixes it for me: that will restart the daemon on the phone, and then MT can talk to it.

BTW, OTA doesn't change how apps are uploaded to the phone - this is ONLY for upgrading the OS. But the OTA process appears to leave the phone's OS in an unstable state. A full restore of the same OS version (using the usb cable and itunes) fixes it.

WIFI syncing might be a separate problem. The phone is basically syncing all the time, tho again, I'm not sure the code on the phone is too stable (or might be killing it a little too soon), hence I get some failed MT deploys, and also some failed iTunes syncs, too.
Comment 11 Sebastien Pouliot 2011-09-07 14:52:05 UTC
Dean, Nic's comments on instability wrt iOS beta releases and OTA updates makes a lot of sense.

However I'd still like if you could answer comment #9 since we might be able to workaround this or at least provide something more useful (than 0xe800007f ;-) as feedback to the users. Thanks!
Comment 12 Dean Cleaver 2011-09-08 09:16:12 UTC
Thanx for that Nic - I will see if that resolves it.
Comment 13 Sebastien Pouliot 2011-09-09 10:39:33 UTC
Dean, not so fast! ;-)

Please try to provide me with the requested data from #9 (and #11), i.e. before "losing" your test case. This could allow me to provide better output to user hitting a similar issue in the future.
Comment 14 Dean Cleaver 2011-09-09 17:36:33 UTC
What's showing is exactly what I posted above...

Unhandled Exception: System.Exception: AMDeviceStartService returned:
0xe800007f
at MonoTouch.Installation.Device.StartService
(MonoTouch.CoreFoundation.CFString) <0x000af>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs)
<0x0036f>
at MonoTouch.Installation.Device.NotificationCallback
(MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed)
MonoTouch.Installation.Device.NotificationCallback
(MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003d>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun
() <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000d>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000c5>
at MTouch.Main (string[]) <0x032d1>

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: AMDeviceStartService
returned: 0xe800007f
at MonoTouch.Installation.Device.StartService
(MonoTouch.CoreFoundation.CFString) <0x000af>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs)
<0x0036f>
at MonoTouch.Installation.Device.NotificationCallback
(MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed)
MonoTouch.Installation.Device.NotificationCallback
(MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003d>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun
() <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000d>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000c5>
at MTouch.Main (string[]) <0x032d1>

The application was terminated by a signal: SIGHUP
Comment 15 Sebastien Pouliot 2011-09-10 12:20:45 UTC
In your "Deploy to Device" pad you should have something like:

Please ensure your device is connected...
Connected to: Neptune
Initializing file service...
Uploading application
Finalizing file service...
Connected to: Neptune
Installing application
Installed application

It should be interupted in the uploading step, but I'm curious to see to which device it got connected (your phone or the 'shadow' device). Thanks!
Comment 16 Sebastien Pouliot 2011-09-30 11:30:41 UTC
I cannot duplicate it myself (using beta7) and it's unclear to what (more specific) message I can map error code 0xe800007f. If you ever reach that error again please re-open the issue and paste the full "Deploy to Device" log. Thanks
Comment 17 Dean Cleaver 2011-09-30 11:36:13 UTC
It appears to be that "phantom" device - when it happens, it's :

Please ensure your device is connected...
Connected to: 

Unplugging and reconnecting as Nic suggested seems to circumvent it for the time being. I'll see if I can get it to happen and post the full log.
Comment 18 Nic Wise 2011-09-30 11:37:27 UTC
I've not seen it in ages, so maybe something in 4.2.x fixed it.
Comment 19 Chris Hardy [MSFT] 2011-10-16 14:30:40 UTC
I'm getting this issue again:


/Developer/MonoTouch/usr/bin/mtouch -installdev "/Users/chrishardy/Projects/PortStreetBeerHouse/PortStreetBeerHouse/bin/iPhone/Release/PortStreetBeerHouse.app"
Please ensure your device is connected...
Connected to: 

Unhandled Exception: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000a7>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x003fb>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003f>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000b>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000bf>
at MTouch.Main (string[]) <0x03333>

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000a7>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x003fb>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003f>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000b>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000bf>
at MTouch.Main (string[]) <0x03333>

The application was terminated by a signal: SIGHUP
Comment 20 Chris Hardy [MSFT] 2011-10-16 14:33:33 UTC
Here's my listdev

/Developer/MonoTouch/usr/bin/mtouch --listdev
: 
ChrisNTR’s iPhone: 1b9bdfce51f43b9e96b0bec9e21736ff7125ef59
Comment 21 Sebastien Pouliot 2011-10-16 14:51:37 UTC
The phantom device seems to happens with ios5 and could be related to
a) people have more than one device (even if only one is plugged); or
b) wireless synching
Comment 22 Sebastien Pouliot 2011-10-16 18:23:46 UTC
it's (b) and I can now duplicate the issue
Comment 23 Sebastien Pouliot 2011-10-16 19:50:01 UTC
The phantom device looks *legit* but it's without much of the real attributes (like no name or id). My guess is that it needs (for apple's api) it's own "handle" in order not to be confused with the existing, hardwired, ones. I suspect apple's tool simply dismiss it (or them) in their UI.

Also the fact that MT works after disconnecting and reconnecting the device is due to the order of devices, i.e. the phantom device becomes the second (not the first) one - allowing 'mtouch' to work.
Comment 24 Sebastien Pouliot 2011-10-17 09:20:21 UTC
phantom menace is over in 44ce4b41ec87745c6999150969ecfb431c152af7
thanks for all the logs/details!
Comment 25 Sebastien Pouliot 2011-10-24 18:42:20 UTC
*** Bug 1662 has been marked as a duplicate of this bug. ***
Comment 26 ric3kg 2011-11-03 14:12:29 UTC
Still getting error after installing MD 2.8.2


/Developer/MonoTouch/usr/bin/mtouch -installdev "/Users/rickgross/Projects/PicturePlannerHD/PicturePlannerHD/bin/iPhone/Release/PicturePlannerHD.app"
Please ensure your device is connected...
Connected to: 

Unhandled Exception: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000a7>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x003fb>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003f>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000b>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000bf>
at MTouch.Main (string[]) <0x03333>

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: AMDeviceStartService returned: 0xe800007f
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000a7>
at MonoTouch.Installation.Installer.UploadApplication (object,System.EventArgs) <0x003fb>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003f>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000b>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x000bf>
at MTouch.Main (string[]) <0x03333>

The application was terminated by a signal: SIGHUP
Comment 27 Sebastien Pouliot 2011-11-03 14:19:36 UTC
The fix is inside MonoTouch 5.0.1 (and future releases) not MonoDevelop (any release)
Comment 28 Larry Ewing [MSFT] 2011-11-15 15:18:32 UTC
*** Bug 2037 has been marked as a duplicate of this bug. ***
Comment 29 ajb 2012-01-09 00:31:57 UTC
It seems we have a regression?

tiberius:~ abhatia$ /Developer/MonoTouch/usr/bin/mtouch -version
mtouch 5.1.1.1323117568
tiberius:~ abhatia$ /Developer/MonoTouch/usr/bin/mtouch --listdev
abhatia’s iPad: dada5632299d061d7f157015437786af3a19b704

Uploading application
Finalizing file service...
error MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com
System.Exception: AMDeviceStartService returned: 0xe800002d
at MonoTouch.Installation.Device.StartService (MonoTouch.CoreFoundation.CFString) <0x000a7>
at MonoTouch.Installation.InstallationProxyService..ctor (MonoTouch.Installation.Device) <0x0003f>
at MonoTouch.Installation.Installer.InstallApplication (MonoTouch.Installation.Device,string) <0x00027>
at MonoTouch.Installation.Installer/<InstallApplication>c__AnonStorey4.<>m__3 (MonoTouch.Installation.Device) <0x0002f>
at MonoTouch.Installation.Installer/<ExecuteWithSession>c__AnonStorey3.<>m__2 (object,System.EventArgs) <0x000ef>
at MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0006e>
at (wrapper native-to-managed) MonoTouch.Installation.Device.NotificationCallback (MonoTouch.Installation.Device/am_device_notification_callback_info&) <0x0003f>
at (wrapper managed-to-native) MonoTouch.CoreFoundation.CFRunLoop.CFRunLoopRun () <0x00003>
at MonoTouch.CoreFoundation.CFRunLoop.Run () <0x0000b>
at MonoTouch.Installation.Installer.ExecuteWithSession (MonoTouch.Installation.Installer/Executor) <0x000d7>
at MonoTouch.Installation.Installer.InstallApplication (string) <0x0006b>
at MTouch.Main2 (string[]) <0x03a57>
at MTouch.Main (string[]) <0x0001f>

The application was terminated by a signal: SIGHUP
Comment 30 Rolf Bjarne Kvinge [MSFT] 2012-01-09 08:39:48 UTC
Yes, there was a regression in the 5.1.1 beta with big applications. It will be fixed for 5.1.2.