Hi,
have been running on Xamarin.iOS version 13.2 for quite some time and have a pretty basic Apple Watch app which was working very smoothly until I did an update to the latest Xamarin.iOS 13.14 version. Suddenly my watch app, and as a matter of fact all sample watch apps, keep crashing on start. In simulator everything's working as expected. Does anyone else experience something similar?
Watch app starts on the apple watch showing basic information.
Watch app start on the apple watch but is immediately closed by the system.
Following log extracted from the xcode
Thread 0 name: tid_407 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x21450c70 __pthread_kill + 8
1 libsystem_pthread.dylib 0x214cd980 pthread_kill + 220
2 libsystem_c.dylib 0x213a46f4 abort + 100
3 ...CSessionAppWatchOSExtension 0x04ace56c print_callback(char const*, int) + 6137196 (runtime.m:1218)
4 ...CSessionAppWatchOSExtension 0x04ac56e8 monoeg_g_logv_nofree + 6100712 (goutput.c:150)
5 ...CSessionAppWatchOSExtension 0x04ac5738 monoeg_g_log + 6100792 (goutput.c:165)
6 ...CSessionAppWatchOSExtension 0x04ab7c4c mono_threads_transition_do_blocking + 6044748 (mono-threads-state-machine.c:725)
7 ...CSessionAppWatchOSExtension 0x04ab5648 mono_threads_enter_gc_safe_region_unbalanced_with_info + 6035016 (mono-threads-coop.c:324)
8 ...CSessionAppWatchOSExtension 0x04a20674 mono_gc_pthread_create + 5424756 (sgen-mono.c:2432)
9 ...CSessionAppWatchOSExtension 0x04ab6aa4 mono_thread_platform_create_thread + 6040228 (mono-threads-posix.c:101)
10 ...CSessionAppWatchOSExtension 0x04a43edc create_thread + 5570268 (threads.c:1384)
11 ...CSessionAppWatchOSExtension 0x04a4397c mono_thread_create_internal + 5568892 (threads.c:1474)
12 ...CSessionAppWatchOSExtension 0x0499a098 mono_gc_init_finalizer_thread + 4874392 (gc.c:1002)
13 ...CSessionAppWatchOSExtension 0x04ad55ac -[XamarinGCSupport init] + 6165932 (monotouch-main.m:199)
14 ...CSessionAppWatchOSExtension 0x04ad5984 xamarin_main + 6166916 (monotouch-main.m:462)
15 ...CSessionAppWatchOSExtension 0x044fc504 xamarin_watchextension_main + 34052 (main.m:47)
16 libdyld.dylib
Visual Studio Enterprise 2019 for Mac
Version 8.5 (build 3183)
Mono Framework MDK
Runtime:
Mono 6.8.0.123 (2019-10/1d0d939dc30) (64-bit)
Package version: 608000123
Xamarin.iOS
Version: 13.14.1.39 (Visual Studio Enterprise)
Xcode
Version 11.4
Hardware
iPhone 11 Pro Max with iOS 13.4
Apple Watch S4 with WatchOS 6.1
This issue was moved to mono/mono#19372
It might be worth keeping this open until the underlying issue is resolved ... I hit it and searched open issues, and went down a rabbit hole at https://github.com/xamarin/xamarin-macios/issues/7742#issuecomment-608994064 ... I'll search for closed as well as open issues in the future.
@DamianMehers were you able to find any sort of workaround, or do you think we simply have to wait for the new mono release to make it into Xamarin Studio?
@rolfbjarne Any idea when this will make it into the Xamarin beta channel? This is currently blocking my team (and I imagine many others) pretty severely.
Thank you!
@nickplee there is a package you can download which fixed this issue for me, it is attached to this comment https://github.com/mono/mono/issues/19372#issuecomment-606539385
But I almost immediately hit another issue, for which there is no workaround (unable to make HttpClient calls on WatchOS): https://github.com/mono/mono/issues/19451
@DamianMehers do you know which Xamarin.IOS was the last "good one"? I mean the one without the crash during startup and with a HttpClient working. TIA
@ThumbGen I don't know I'm afraid. I suspect you'd also need to roll Xcode back too ...
Going forward I need to have a VM which I can upgrade to the latest Xcode and Visual Studio Mac, so that I can test building and running my app, before I update my main machine.
I've tried building the latest https://github.com/xamarin/xamarin-macios and setting it as my current config, but Visual Studio is now crashing on launch. I'll let post here if I find a way to build and run.
@nickplee The stable version of Xamarin.iOS already has the fix, but I'm not quite sure when the beta channel will be updated.
@nickplee The stable version of Xamarin.iOS alreadt has the fix, but I'm not quite sure when the beta channel will be updated.
@rolfbjarne thanks - I had not realized it was already there. Do you have any insights into the BitCode error when using System.Net.Http? Did you switch to using a new Http library from the new runtime? Or is this a newly flagged error?
I've tried building a new System.Net.Http from the new runtime with the catch changed to replace the when with an if but that runtime uses 5.0 - I can't find a source for System.Net.Http that uses catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e)) other than the new runtime.
Any thoughts on workarounds?
Many thanks,
Damian
@rolfbjarne thanks - I had not realized it was already there. Do you have any insights into the BitCode error when using System.Net.Http?
No, unfortunately I don't.
Did you switch to using a new Http library from the new runtime? Or is this a newly flagged error?
I've tried building a new System.Net.Http from the new runtime with the catch changed to replace the
whenwith anifbut that runtime uses 5.0 - I can't find a source for System.Net.Http that usescatch (Exception e) when (StreamCopyExceptionNeedsWrapping(e))other than the new runtime.
I would be better to ask this at the mono issue instead, they might know: https://github.com/mono/mono/issues/19451
I would be better to ask this at the mono issue instead, they might know: mono/mono#19451
I asked a week ago, but no reply yet. I'll post a more detailed question.
Most helpful comment
@nickplee there is a package you can download which fixed this issue for me, it is attached to this comment https://github.com/mono/mono/issues/19372#issuecomment-606539385
But I almost immediately hit another issue, for which there is no workaround (unable to make HttpClient calls on WatchOS): https://github.com/mono/mono/issues/19451