Building the app succeeds. App gets copied/installed to iPhone Device successfully.
App FAILS to launch from VS and no debug info is captured. If you manually launch the app that was just copied it works fine, but again no debug info is sent to VS2017.
BUILD:
PostflightingApplication - PercentComplete: 70%
SandboxingApplication - PercentComplete: 80%
GeneratingApplicationMap - PercentComplete: 90%
Application bundle 'com.eimc.mobile' installed on 'Ad iPhone2'
DEBUG:
The app has been terminated.
Launch failed. The app 'EIMC.iOS' could not be launched on 'Ad iPhone2'. Error: error MT1006: Could not install the application '/Users/amitlaptop/Library/Caches/Xamarin/mtbs/builds/EIMC.iOS/3f7616e5ab8de1149b09da6521379345/bin/iPhone/Debug/EIMC.iOS.app' on the device 'Ad iPhone2': Read Error (error: 0xe8000004).. Please check the logs for more details.
The app has been terminated.
The app has been terminated.
ERROR List (entire Solution):
Severity Code Description Project File Line Suppression State
Error error MT1006: Could not install the application '/Users/amitlaptop/Library/Caches/Xamarin/mtbs/builds/EIMC.iOS/3f7616e5ab8de1149b09da6521379345/bin/iPhone/Debug/EIMC.iOS.app' on the device 'Ad iPhone2': Read Error (error: 0xe8000004). 0
VS bug #598289
Hello, I would encourage you to try some of the solutions listed in this GitHub issue https://github.com/xamarin/xamarin-macios/issues/3750 like updating everything to latest Xamarin stable (including your Mac build host) and also your Xcode.
That 0xe8000004 reminds me when I had some activation issues with my first iPhone on Windows and turned out to be my usb cable, one of the pins from the old connector cable was damaged, I would find surprising this happening with a lightning cable but anything is possible.
Also try rebooting both your Mac and Phone, also try deploying from the Mac directly using Xcode and VS4Mac just to rule out more possibilities. If this does not help feel free to reopen the issue.
Same here. My deploy-to-device step would take forever, and then fail with a "read error". Must have been my USB-C to lighting cable. In my case, I just had to flip the lightning cable around. I eventually switched to a different cable altogether.
While i experience similar issues, i really don't think it's the cable. I can reboot without removing the cable and it's work fine. But yes, the copyingfile - PercentComplete takes forever and then fails. It's happening right now infact. I tried your trick of flipping the cable to see but not helping. The issue started right after i installed an ad-hoc release build from MS-AppCenter and then went back to local/Debug builds. my app icon has now gone to the default white with the circle-grid icon and the MT1006: could not install happens on ever build... switching to Android for now :)
Well now the application builds and installs in a few seconds, per usual, but there is no debug information coming back to VS... will pick up another new cable tomrorow, but using a fairly new one direct from apple not a generic brand...
Same here. Mine was official Apple as well.
Thanks for your help and insight. I HOPE a $27 cable fixes my woes! Have lost a bunch of hours today on this. not to mention over the last few weeks! Thanks have a great night.
Last one... just tried via network (no cable) and same cannot write error...
And that's with WiFi debugging enabled, I would assume?
I frequently do a "deep clean" by completely deleting all bin & obj folders (not via the Clean action in VS). I have a blog post about creating a right-click action in Finder to do this:
http://www.joesauve.com/remove-obj-and-bin-folders-via-os-x-finder/
Just be sure to set the constrained path in the script to the folder in which you keep all your source code projects.
Yep very Familiar with that and then reboot Or at least restart VS often... let鈥檚 see what happens with a new cable tomorrow thanks again
New cable, same issue. Just a note brand new cable, reboot PC, Mac Reboot, phone power-off and on, Open/Clean solution (verify debug mode - obj/bin folders clean 100%) still same issue... again this happened frequently, but is happening consistently now after install of the app from MS-AppCenter from Ad-Hoc distribution. Interestingly, the simulators also show no app icon now... i'm pretty sure something "broke" inside Xamarin. i Had another issue which was experienced by a lot of folks and that got solved from 15.6.6 upgrade a few days ago. But had plenty of successful debug sessions with 15.6.6...
Wow. Very interesting. The Xamarin tooling definitely breaks sometimes. You could try switching to beta or alpha update channel momentarily, just to see if those release pipelines possibly have a fix already.
sadly last time i did that and had side-by-side VS running there was a ton of problems and i lost weeks (not kidding) of being able to build. It's android an emulator for me now, but this is a huge mess. Again i appreciate you chiming in with ideas... but after a few years of working with xamarin i know when it's "not me"
GOOD NEWS - UPDATE: while i was writing the last post i had a hunch/idea to try to manually change the iOS build number. and lo-and-behold it's back to working! Waste of a $20 cable though :)
app icon is still missing though...
My app was deploying fine when I left work last night, but would not deploy to my device when I came in this this morning. I did not touch the phone, or making any code changes during this time.
Using @Amd3202 suggestion, I manually changed the Build number in Info.plist, and my app instantly started to deploy again.
None of the approachs worked for me. I tried:
Exactly same error. MT1006 and 0xe8000004
Any other ideas?
I assume you have upgraded to latest versions of VS? There were definitely some builds there that VS was totally crashing with Xamarin. I also heard from a MS MVP that the last build has been problematic, so i have not upgraded... 2/18/2019.... also make sure you're in Debug not Release. EVERY other time i had this issue it was related to the version and build number. Make sure you're updating both of them since i really can't tell what jams it up. Best of luck and please let us know (below) if you find something else that solves it.
Does it work if you create a new app from a template?
It actually started working again. But it made no sense.
It was not working on VS 2017 Version 15.9.3, Xam.iOS 12.2.1.15
I added the build version - Did Not Work
Went to cable - Did Not Work
Tried from Notebook B with VS 2017 Version 15.9.7 - Did Not work
Updated Notebook A to VS 2017 Version 15.9.7 - worked.
For me it does not make any sense.
One more piece of information. Changed link from SDK only to none, it failed again. Changed back to Link SDK's only, it got bat working. (Maybe this help someone)
Try creating a new project in XCode and try to run on the same device you were trying to run with Xamarin, in my case, there was something about signing to be fixed. XCode fixed and after that, I was able to run the Xamarin app.
Hope it can help someone!
I am still having the same issue!
Same issue
My app was deploying fine when I left work last night, but would not deploy to my device when I came in this this morning. I did not touch the phone, or making any code changes during this time.
Using @Amd3202 suggestion, I manually changed the Build number in Info.plist, and my app instantly started to deploy again.
The solution of changing the build number currently works (using the latest Xamarin versions).
I ran into this problem this morning as well, after upgrading to the latest stable VS 2019 (16.5),
I changed the linker settings to 'Do not link', and changed the build number in the Info.plist (I went from 1.0 to 1.0.1), and it immediately worked after a clean and rebuild.
Most helpful comment
My app was deploying fine when I left work last night, but would not deploy to my device when I came in this this morning. I did not touch the phone, or making any code changes during this time.
Using @Amd3202 suggestion, I manually changed the Build number in Info.plist, and my app instantly started to deploy again.