nayanAubie / msal_auth

A new Flutter plugin for Azure AD authentication.
MIT License
9 stars 11 forks source link

Testflight crash app on first launch #25

Open grantv-outie opened 2 months ago

grantv-outie commented 2 months ago

We make use of a B2C flow, launching it at startup. It all works fine, but upon first launch through TestFlight it causes the app to crash. TestFlight shows the test notes over the app at first launch, which seems to interfere with the login flow being launched behind it.

0   msal_auth                       0x00000001015a12dc Swift runtime failure: force unwrapped a nil value + 0 (<compiler-generated>:0)
1   msal_auth                       0x00000001015a12dc specialized static UIViewController.keyViewController.getter + 1464 (MsalAuthPlugin.swift:379)
2   msal_auth                       0x00000001015a3084 static UIViewController.keyViewController.getter + 4 (<compiler-generated>:0)
3   msal_auth                       0x00000001015a3084 specialized MsalAuthPlugin.acquireToken(scopes:result:) + 64 (MsalAuthPlugin.swift:93)
4   msal_auth                       0x00000001015a3084 specialized MsalAuthPlugin.handle(_:result:) + 1960 (MsalAuthPlugin.swift:36)
5   msal_auth                       0x000000010159d304 specialized MsalAuthPlugin.handle(_:result:) + 16 (<compiler-generated>:0)
6   msal_auth                       0x000000010159d304 @objc MsalAuthPlugin.handle(_:result:) + 84
7   Flutter                         0x0000000102a3c1c8 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164 (FlutterChannels.mm:313)
8   Flutter                         0x00000001024c6aec invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_fl::unique_ptr<flutter::PlatformMessage, std::_fl::default_delete<flutter::PlatformMessage>>) + 116 (platform_message_handler_ios.mm:70)
9   libdispatch.dylib               0x00000001931bd13c _dispatch_call_block_and_release + 32 (init.c:1530)
10  libdispatch.dylib               0x00000001931bedd4 _dispatch_client_callout + 20 (object.m:576)
11  libdispatch.dylib               0x00000001931cd5a4 _dispatch_main_queue_drain + 988 (queue.c:7898)
12  libdispatch.dylib               0x00000001931cd1b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058)
13  CoreFoundation                  0x000000018b2eb710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
14  CoreFoundation                  0x000000018b2e8914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
15  CoreFoundation                  0x000000018b2e7cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
16  GraphicsServices                0x00000001cfd351a8 GSEventRunModal + 164 (GSEvent.c:2196)
17  UIKitCore                       0x000000018d921ae8 -[UIApplication _run] + 888 (UIApplication.m:3713)
18  UIKitCore                       0x000000018d9d5d98 UIApplicationMain + 340 (UIApplication.m:5303)
19  UIKitCore                       0x000000018db4f504 UIApplicationMain(_:_:_:_:) + 104 (UIKit.swift:539)
20  Runner                          0x00000001009ec63c specialized static UIApplicationDelegate.main() + 28 (<compiler-generated>:5)
21  Runner                          0x00000001009ec63c static AppDelegate.$main() + 28 (AppDelegate.swift:0)
22  Runner                          0x00000001009ec63c main + 116
23  dyld                            0x00000001aeabf154 start + 2356 (dyldMain.cpp:1298)
nayanAubie commented 1 month ago

@grantv-outie Is your debug app working? Also need more information of how are you using it