-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug]Xamarin Forms iOS app crashes in iOS 14.2 when installed via MDM and devices enrolled with no user affinity #12811
Comments
@samhouts there are several other reports here https://forums.xamarin.com/discussion/186138/ios-14-2-app-crashes-if-deployed-via-mdm-but-not-from-appstore |
We have the same problem with our app. |
@shoyheim what is you Xamarin Forms version? |
@cheles We just rebuilt hoping to solve the problem, so we're on 4.8.0.1560, and it's built through appcenter.ms with XCode 12.1 |
only Xcode 12.2 RC includes SDKs for iOS 14.2, iPadOS 14.2, tvOS 14.2, watchOS 7.1, and macOS Big Sur 11 per above link. Xcode 12.2 is currently in Beta/RC |
@shoyheim : Is the issue still there after you built the app with XCode 12.1 and deployed via MDM on device-affinity iPads/iPhones? |
@akashvashisht Yes, made no difference. |
@shoyheim : Thanks for the confirmation ! |
I am experiencing the same issue. It occurs with Xamarin.iOS (14.4.1.3) apps as well, not just Xamarin.Forms. The app crash at launch only occurs if the app is deployed via MDM from the App Store and does not occur if the app is built as an IPA and deployed via MDM. The following workaround resolves the app crash:
|
Hi all, thanks for raising this issue! As @spouliot mentioned here in this parallel issue dotnet/macios#10086:
@akashvashisht if you could share your build logs that capture the crash, that would be really helpful in helping us to further investigate the issue here! Thanks again :) |
@rachelkang : Here are the crash logs : {"app_name":"iCareHealth.Mobile.iOS","timestamp":"2020-11-07 21:25:40.00 +0800","app_version":"3.1.43510","slice_uuid":"60fc0967-b84d-315c-ba71-ce474a67af15","adam_id":1117249459,"build_version":"3.1.43510","platform":2,"bundleID":"au.com.icarehealth.medmobilepublic","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 14.2 (18B92)","incident_id":"BB18EB67-F23D-40F6-8E35-084D9BC604DE","name":"iCareHealth.Mobile.iOS"} Date/Time: 2020-11-07 21:25:39.7051 +0800 Exception Type: EXC_BAD_ACCESS (SIGKILL) Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d Thread 0 name: tid_407 Dispatch queue: com.apple.main-thread Thread 1: Thread 2 name: SGen worker Thread 0 crashed with ARM Thread State (64-bit): Binary Images: EOF |
@rachelkang : These are the symbolicated logs : tid_407 Dispatch queue: com.apple.main-thread (0) #0 (null) in 0 () Thread 1 #0 (null) in 0x1ce169000 () SGen worker (2) #0 (null) in 0x1b2245000 () |
@mlancione : We tried your workaround after deploying the app via InTune and also tried via Apple Configurator and we don't see our app in the list of apps which can be offloaded. It's deployed on iPads which are enrolled with device-affinity |
The logs still seem to indicate that watchdog is terminating the application due to it taking > 20s to launch. Can you help provide more context around what your app is doing in the AppDelegate and Forms startup? |
I am experiencing the same issue with an application, the live version has been live for a while but since the 14.2 release, clients using an MDM deployment have been unable to run the application. As the OP says, if the App is downloaded from the app store, or the work around above is used, they can run the application. The behaviour (runs on <= 14.1 via various MDM solutions, but not on 14.2, and runs on all versions via App Store) has been confirmed. This is affecting multiple airline businesses who use the app. Its almost as if the MDM installed version is now failing a permission check, where as the Store installed version is fine (They are the same binary signed with different certs). The version available to users was built using Xamarin,iOS 13.20 and XCode 11.7 (I haven't updated to XCode 12 due to a number of issues relating to multitasking). Start up time is usually about 3 seconds. The logs are showing the same watchdog shutting the app down after 20s. It seems very odd that 14.1 is fine and 14.2 is an issue. |
@RobertPeppin, yep, same issue as ours, by the sounds of it. Is your MDM deployment enrolling the device without user affinity? (i.e. with device affinity; no Apple ID associated with the devices). This seems to be significant in our case. The app works when installed via MDM with user affinity, but crashes when installed without user affinity. |
@Redth , here is the startup code in our AppDelegate:
|
Also, potentially of significance: The app call AppCenter.Start() as soon as it is loaded to register the app with Microsoft AppCenter for crash logs and telemetry, however the app start is never recorded in the AppCenter. The call to AppCenter.Start may not be finishing, perhaos The app accesses the file system on the device to create a SQLite database. It is perhaps related to permissions in some way? Just a hunch. We see this in the app crash:
... perhaps the 'Permission fault' and mapped file 'r-x/r-x' permissions are significant here? |
@spouliot any ideas? Also is it possible to post some of the ctor of your App class? |
@stewart-rae would it be possible to re-build/deploy w/MDM your app without AppCenter ? Ideally removing the dependency (so nothing from the binaries is part of the app bundle) but it might be simpler just to comment the code first.
|
@spouliot We are experiencing this crash and do not use AppCenter. |
@mlancione can you share your build logs ? many solutions are using common libraries (e.g. |
@spouliot Sure. Can this be done directly to you via email or via another private channel? |
@mlancione sepoulio@microsoft.com thanks! |
Our App constructor looks like this:
|
Not sure if it helps: I'm working at Microsoft and have 2 customer apps affected by this. In both cases the apps are built by Microsoft. So it is easy to give you access to the full apps and source code internally. None of the apps are using a MDM SDK. |
@DerPate2010 thanks, you can reach me with my email from #12811 (comment) We're still going thru data we gathered. Additional data is still welcome :) |
Everyone Please file a feedback ticket with Apple with your specific information. Also make sure to link this https://feedbackassistant.apple.com/feedback/8895585 ticket (in the text) so they can all be seen as a single issue. Thanks! |
Please use dotnet/macios#10086 if you want to add any other public information to this issue. |
Description
When our app, named MedMobile (current release version 3.1) is installed via MDM ( like InTune , Applle Configurator ) on an iOS/iPad device which has been enrolled 'without user affinity' / 'with device affinity', the app fails to start under iOS 14.2.
It shows white screen and then crashes after 20 seconds. Same Configuration worked with previous OS versions, including 14.1.
The app works when installed via the App Store on iPads with iOS 14.2. App also works when installed via TestFlight on iPads with iOS 14.2
Steps to Reproduce
Expected Behavior
App shows activation screen
Actual Behavior
App shows white screen and the get terminated after 20 seconds
Basic Information
Screenshots
App Link on app store
https://apps.apple.com/us/app/medmobile/id1117249459
Workaround
No workaround
Crash logs
iCareHealth.Mobile.iOS-2020-11-07-212540 2020-11-08 01_11_46 .txt
Symbolicated Crash logs
iCareHealth.Mobile.iOS-2020-11-07-212540 2020-11-08 01_11_4_SYMBOLICATED.txt
The text was updated successfully, but these errors were encountered: