Xamarin.Forms app, works in simulator, started hanging on iOS Devices: dynamic-codesigning entitlement Error - xamarin

My app has started failing on devices seemingly out of the blue. When debugging it just hangs and sits there. Doesn't crash. I've found the following errors in the device log:
Error (0) / kernel(Sandbox): TUE.myiOSApp(629) System Policy: MAP_JIT requires the dynamic-codesigning entitlement
Error (222) / DTServiceHub(FrontBoardServices): [FBSSystemService][0x658f] Sending request to open "com.MyAppName”
Error (589) / SpringBoard(FrontBoard): [com.MyAppName] Provision violated for watchdog scene-create: <FBSProcessResourceProvision: 0x1c54fa400; allowance: <; FBSProcessResourceAllowance; type: realTime; timeValue: 18.57s>; violated: YES>
Error (589) / SpringBoard(KeyboardArbiter): [<_UIKeyboardArbiterHandle: 0x1c4115720; PID 631: com.MyAppName <(null)>; hosting PIDs {(
Error (589) / SpringBoard(KeyboardArbiter): -[_UIKeyboardArbiter runOperations:onHandler:]_block_invoke Failed to access <_UIKeyboardArbiterHandle: 0x1c4115720; PID 631: com.MyAppName <(null)>; hosting PIDs {(
I noticed another line that mentioned the process wasn't killed by the OS because it was being debugged.
This started happening right after I added a new device to the developer profile at the Apple Developer portal. I redownloaded the profile and installed it in xCode and in Visual Studio for Mac. The first time I ran the app on the new device, it ran successfully and I could debug. After that it started freezing. It also freezes on the old device I had been debugging successfully on just moments prior.
I've tried cleaning the solution, deleting all bin/obj folders. Restarting the device. Rebooting my Mac, etc.. nothing works.
I've dug around a little bit regarding the MAP_JIT error, however, the only answers I've found is to ensure Xcode is up to date. I'm on Xcode 11.3.1 and the command line tools are installed.
I updated to the latest version of Visual Studio for Mac which did not solve the issue
Any ideas?
Thanks!
Sean

Related

Xamarin App Fails to Start on IOS device after device update to IOS 12

I have updated IOS on device to 12.0.1 and XCode to version 10. I am able to build the app, deploy to simulator on mac with IOS 12 but when I deploy the app to the device it starts, shows a splash screen and quits. The icon stays but the app will always fall after start.
I tried debuging but it doesn't even get to any of the constructors of Main or App in Native or PCL code.
I don't even know what to try next. All information I have is:
Launch failed. The app 'Tempick.iOS' could not be launched on 'iPhone (Yuriy)'. Error: error MT1007: Failed to launch the application '/Users/yzolotarev/Library/Caches/Xamarin/mtbs/builds/Tempick.iOS/896e108cc5f36e1ca3def01022a148c7/bin/iPhone/Debug/Tempick.iOS.app' on the device 'iPhone (Yuriy)': Specified cast is not valid.. You can still launch the application manually by tapping on it.. Please check the logs for more details.
All I could find on the web was restart XCode, restart device, delete app, restart MAC. All of that I tried and it doesn't work.
I am experiencing this for all apps I have. I have a feeling its something to do with the provisioning profile/certificate that doesn't get recognised after the update of the IOS on the divice. Has anyone come across a similar problem?
UPDATE
I was able to trace the device log which reads the following:
Time Device Name Type PID Tag Message
Oct 23 17:37:23 iPhone-Yuriy Error 52 SpringBoard(AssertionServices) [com.maddyz.Tempick] Bootstrap failed with error: <NSError: 0x282837d80; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
______
Time Device Name Type PID Tag Message
Oct 23 17:37:23 iPhone-Yuriy Error 52 SpringBoard(FrontBoard) Bootstrapping failed for <FBApplicationProcess: 0x10a7dda10; com.maddyz.Tempick; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID com.maddyz.Tempick" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID com.maddyz.Tempick, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x282836e20 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:com.maddyz.Tempick[0x482d][62], BKLaunchdJobLabel=UIKitApplication:com.maddyz.Tempick[0x482d][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:com.maddyz.Tempick[0x482d][62], BSErrorCodeDescription=bootstrap-failed}
After I have tried numerous approaches I finally found a device log notice that printed this:
Time Device Name Type PID Tag Message
Oct 24 12:50:41 iPhone-Yuriy Notice 0 kernel(AppleMobileFileIntegrity) AMFI: '/private/var/containers/Bundle/Application/4D4359E4-8947-425E-95B4-82AC4D910449/IOS12Test.iOS.app/IOS12Test.iOS' does not pass CT evaluation, result: 0x80008
Oct 24 12:50:41 iPhone-Yuriy Notice 0 kernel(AppleMobileFileIntegrity) AMFI: '/private/var/containers/Bundle/Application/4D4359E4-8947-425E-95B4-82AC4D910449/IOS12Test.iOS.app/IOS12Test.iOS': Unrecoverable CT signature issue, bailing out.
After googling this a little I came across another stack message
iOS app won't run on device any more under iOS 12: Unrecoverable CT signature issue
After changing permissions to Apple Worldwide Developer Relations Certification Authority to Use System Defaults I was able to start the demo app.
I'm still learning how to work with Xamarin.iOS myself but I ran into the same problem. It has to do with the linker. Open the iOS project properties and under iOS Build change Linker Behavior to Don't Link. This should let you debug on a physical device but the app size will be too big to be able to deploy to the app store.
I don't know if this will apply to you but I also had to downgrade my project's Entity Framework Core packages to 2.0.3. I read elsewhere that other people were having issues with later versions.
On Windows Xamarin.Forms isn't available for Debug from the Device it self. Even the "Xamarin Live Player" has expired for iOS. You should connect to a MAC so you can make the Build for your project. Even some other Frameworks like PhoneGap aren't available for iOS anymore.
As always Apple taking all for themselves.

Failed to boot IBSimDeviceTypeiPad2x

Accessing storyboard hangs xcode, then throws error below.
This happens for newly created project, on newly (re)installed xcode.
I've tried xcrun simctl commands, there is no device with UDID: 9C08E254-108D-49F6-A1FC-CE43B2F30EB9.
Not clear which device IBSimDeviceTypeiPad2x is.
Deleted and recreated all iPad devices in Simulator.
iPad 2 is not possible on iOS 11.4
Have already done complete uninstall and reinstall of xcode (including removing ~/Library/Developer / Cache / Application Support stuff.
Problem persists.
Error:
Encountered an error communicating with Interface Builder Cocoa Touch Tool.
(Failure reason: Interface Builder Cocoa Touch Tool failed to launch):
Failed to boot device IBSimDeviceTypeiPad2x (9C08E254-108D-49F6-A1FC-CE43B2F30EB9, iOS 11.4, Shutdown)
System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription:
0x7f93a450bec0> scaleFactor=2x (Failure reason: Failed to boot IBSimDeviceTypeiPad2x (9C08E254-108D-49F6-A1FC-CE43B2F30EB9, iOS 11.4, Shutdown)):
Unable to boot the Simulator. (Failure reason: launchd failed to respond.)
launchd_sim log contains:
missing or invalid configuration plist
xcode version:
Version = 9.4.1 (9F2000)
Plugin Version = 14113
Beta Version = 0
OS Version = 10.13.6 (17G65)
In case this helps anyone else with this issue: after weeks of back and forth with Apple Support, we tracked this down to either third party kernel extensions or third-party antivirus. After thoroughly ensuring both were disabled, Storyboard editing became available again. In my case, it was most likely Little Snitch that was interfering (make sure both Network Filter & Network Monitor are set to the "off" position). There could potentially be a Little Snitch rule that's interfering as well, I haven't spent enough time to track it down yet.
I have been struggling with this for some time, filed a bug report with Apple and they claimed I didn't have permission. No reference to what permissions.
Towards the bottom of the log file from the bug report was the following text.
"You don’t have permission to save the file “60ACC3A5-E7E2-4330-869B-15447826C019” in the folder “CoreSimulator”." UserInfo={NSFilePath=/Users/terryburdett/Library/Logs/CoreSimulator/60ACC3A5-E7E2-4330-869B-15447826C019, NSUnderlyingError=0x7fda1871c8b0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}}}}
Follow the path to Logs and getinfo on Logs folder. If your name isn't in the sharing and permissions list, unlock the folder and add it. Change permissions to read/write. Next time you run Xcode it should create an CoreSimulator folder in the Logs folder and compile without bug.

LLDB RPC server freezes app

For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes

windows phone deployment error DEP0001 : Unexpected Error: -2147009290 ‭

Working on a Windows Phone 10 app and ran it from Visual Studio on my ARM (Lumia 950) device several times. Then an OS update came in for my 950 and it soon did a forced reboot; updating to 10.0.14393.576.
I may have had one or two successful deploys/debug launches from VS to the phone after that but then this error started and I am blocked.
DEP0001 : Unexpected Error: -2147009290
This comes after the app has apparently successfully deployed and is trying to launch the app.
I tried several battery-pull reboots of the phone and rebooting the PC. The app is not installed on the phone (in the app list.)
I went to the Store to install a few apps and uninstall a few to see if that un-jarred it.
But nothing worked. Trying to avoid a hard reset if possible.
I found one instance of this error here:
Error 80073cf6 while installing my app on windows phone 8.1
But that's pretty old and unresolved.
Any ideas?
Figured it out. I had deleted a splash screen image but left a reference to it in the package.manifest so it was looking for when launching on the phone. When I added back the splash screen it deployed and ran successfully.

Xcode 7.3 wont attach to simulator to debug

So I upgraded to Xcode 7.3.1 and now my Xcode will build, and deploy my apps (yes every app, even a brand new blank one) to the simulator but the app never launches on the simulator and the debugger never attaches, Xcode just hangs and has to be force quit. I've completely wiped out Xcode and all simulators and re-installed to no avail. I've scoured Stack Overflow and Google trying every piece of advice and still no luck. Anyone anywhere have any idea how to solve this issue? If I downgrade to 7.2.1 I'm able to debug in the simulator just fine.
Let me know if you need more information.
My Apps run just fine on the simulator, and if I try to attach the debugger to a running app it wont and Xcode hangs in the attempt, when attempting to attach this way at least Xcode doesn't have to be force quit.
FYI, I can debug on a device this is only a simulator issue.
I had this same issue, and tried fixing my projects and reinstalled Xcode twice before I was able to get Simulator to crash and give me an error report that called out Cylance. Luckily I have access to administer our Cylance portal, so I was able to work through the issue to narrow down the problem.
Symptoms:
When running an app from Xcode, the Simulator launches but the application does not launch within the Simulator
Trying to stop the application from within Xcode does not work, and generates no messages
Trying to re-run the application from within Xcode generates the following message: ‘An instance of “APPLICATION NAME” is already running. Choose “Stop” to terminate and launch a new instance.’ But pressing Stop does nothing.
Xcode will not quit, and eventually the user must Force Quit to exit Xcode
Within the OS X console, the following messages are displayed:
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] main process is a platform binary, but mapped executable file is not: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] mapped file has team identifier XXXX: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Resolution:
The problem is caused by Memory Protection being turned on within the policy assigned to the Mac within the Cylance portal.
To resolve the issue, place the Mac into a zone/policy that does not have Memory Protection turned on. Auto Quarantine and Protection Settings can be left on.
During my testing, I was not able to come up with a list of exclusions that allowed me to leave Memory Protection on, so I ended up disabling it completely.

Resources