Skip to content

[Auth] async Auth.auth().fetchSignInMethods(forEmail email: String) causes weird crash on the latest version of Firebase Auth SDK 11.1.0 #13550

@remziyildirim

Description

@remziyildirim

Description

After updating Firebase Auth SDK CocoaPods version from 10.29.0 to 11.1.0, this crash appears in the Firebase Crashlytics Dashboard. I tried to reproduce it on my device, but I couldn't.

It seems it starts to crash inside of the Auth.auth().fetchSignInMethods function. I saw that in the release notes of the version 11.1.0 there is a fix might lead this issue, but I'm not sure.

11.1.0 Release note
[Auth] Fix async/await crash from implicitly unwrapped nil error by @ncooke3 in #13472

We have been using fetchSignInMethods function since October 2023 and have never encountered this crash.

let signInMethods = try await Auth.auth().fetchSignInMethods(forEmail: "emailAddress")
debugPrint("Authentication \(#function) signInMethods: \(signInMethods)")

Reproducing the issue

No response

Firebase SDK Version

11.1.0

Xcode Version

15.3

Installation Method

CocoaPods

Firebase Product(s)

Authentication

Targeted Platforms

iOS

Relevant Log Output

Firebase Crashlytics log;
          Crashed: com.apple.main-thread
0  FirebaseAuth                   0x10054 closure #1 in closure #1 in Auth.fetchSignInMethods(forEmail:) + 116
1  FirebaseAuth                   0x25270 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed AuthDataResult?, @guaranteed Error?) -> () + 24 (<compiler-generated>:24)
2  FirebaseAuth                   0x6dd64 partial apply for specialized closure #1 in static Auth.wrapMainAsync<A>(callback:withParam:error:) + 40
3  FirebaseAuth                   0xd664 thunk for @escaping @callee_guaranteed () -> () + 28
4  libdispatch.dylib              0x637a8 _dispatch_call_block_and_release + 24
5  libdispatch.dylib              0x64780 _dispatch_client_callout + 16
6  libdispatch.dylib              0x45e10 _dispatch_main_queue_drain + 888
7  libdispatch.dylib              0x45a88 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36
8  CoreFoundation                 0x919ac __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9  CoreFoundation                 0x75648 __CFRunLoopRun + 2080
10 CoreFoundation                 0x79d20 CFRunLoopRunSpecific + 584
11 GraphicsServices               0x1998 GSEventRunModal + 160
12 UIKitCore                      0x37134c <redacted> + 868
13 UIKitCore                      0x370fc4 UIApplicationMain + 312
14 HOLIDAY_PIRATES                0x49e5c4 main + 27 (AppDelegate.swift:27)
15 ???                            0x1f049c344 (Missing)

If using Swift Package Manager, the project's Package.resolved

No response

If using CocoaPods, the project's Podfile.lock

PODS:

  • Firebase/Analytics (11.1.0):
    • Firebase/Core
  • Firebase/Auth (11.1.0):
    • Firebase/CoreOnly
    • FirebaseAuth (~> 11.1.0)
  • Firebase/Core (11.1.0):
    • Firebase/CoreOnly
    • FirebaseAnalytics (~> 11.1.0)
  • Firebase/CoreOnly (11.1.0):
    • FirebaseCore (= 11.1.0)
  • Firebase/Crashlytics (11.1.0):
    • Firebase/CoreOnly
    • FirebaseCrashlytics (~> 11.1.0)
  • Firebase/RemoteConfig (11.1.0):
    • Firebase/CoreOnly
    • FirebaseRemoteConfig (~> 11.1.0)
  • FirebaseABTesting (11.1.0):
    • FirebaseCore (~> 11.0)
  • FirebaseAnalytics (11.1.0):
    • FirebaseAnalytics/AdIdSupport (= 11.1.0)
    • FirebaseCore (~> 11.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • FirebaseAnalytics/AdIdSupport (11.1.0):
    • FirebaseCore (~> 11.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleAppMeasurement (= 11.1.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • FirebaseAppCheckInterop (11.1.0)
  • FirebaseAuth (11.1.0):
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseAuthInterop (~> 11.0)
    • FirebaseCore (~> 11.0)
    • FirebaseCoreExtension (~> 11.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GTMSessionFetcher/Core (~> 3.4)
    • RecaptchaInterop (~> 100.0)
  • FirebaseAuthInterop (11.1.0)
  • FirebaseCore (11.1.0):
    • FirebaseCoreInternal (~> 11.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/Logger (~> 8.0)
  • FirebaseCoreExtension (11.1.0):
    • FirebaseCore (~> 11.0)
  • FirebaseCoreInternal (11.1.0):
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
  • FirebaseCrashlytics (11.1.0):
    • FirebaseCore (~> 11.0)
    • FirebaseInstallations (~> 11.0)
    • FirebaseRemoteConfigInterop (~> 11.0)
    • FirebaseSessions (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/Environment (~> 8.0)
    • nanopb (~> 3.30910.0)
    • PromisesObjC (~> 2.4)
  • FirebaseInstallations (11.1.0):
    • FirebaseCore (~> 11.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • PromisesObjC (~> 2.4)
  • FirebaseRemoteConfig (11.1.0):
    • FirebaseABTesting (~> 11.0)
    • FirebaseCore (~> 11.0)
    • FirebaseInstallations (~> 11.0)
    • FirebaseRemoteConfigInterop (~> 11.0)
    • FirebaseSharedSwift (~> 11.0)
    • GoogleUtilities/Environment (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
  • FirebaseRemoteConfigInterop (11.1.0)
  • FirebaseSessions (11.1.0):
    • FirebaseCore (~> 11.0)
    • FirebaseCoreExtension (~> 11.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • nanopb (~> 3.30910.0)
    • PromisesSwift (~> 2.1)
  • FirebaseSharedSwift (11.1.0)
  • GoogleAppMeasurement (11.1.0):
    • GoogleAppMeasurement/AdIdSupport (= 11.1.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • GoogleAppMeasurement/AdIdSupport (11.1.0):
    • GoogleAppMeasurement/WithoutAdIdSupport (= 11.1.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • GoogleAppMeasurement/WithoutAdIdSupport (11.1.0):
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • GoogleDataTransport (10.1.0):
    • nanopb (~> 3.30910.0)
    • PromisesObjC (~> 2.4)
  • GoogleSignIn (8.0.0):
    • AppAuth (< 2.0, >= 1.7.3)
    • AppCheckCore (~> 11.0)
    • GTMAppAuth (< 5.0, >= 4.1.1)
    • GTMSessionFetcher/Core (~> 3.3)
  • GoogleTagManager (8.0.0):
    • FirebaseAnalytics (~> 11.0)
  • GoogleUtilities/AppDelegateSwizzler (8.0.2):
    • GoogleUtilities/Environment
    • GoogleUtilities/Logger
    • GoogleUtilities/Network
    • GoogleUtilities/Privacy
  • GoogleUtilities/Environment (8.0.2):
    • GoogleUtilities/Privacy
  • GoogleUtilities/Logger (8.0.2):
    • GoogleUtilities/Environment
    • GoogleUtilities/Privacy
  • GoogleUtilities/MethodSwizzler (8.0.2):
    • GoogleUtilities/Logger
    • GoogleUtilities/Privacy
  • GoogleUtilities/Network (8.0.2):
    • GoogleUtilities/Logger
    • "GoogleUtilities/NSData+zlib"
    • GoogleUtilities/Privacy
    • GoogleUtilities/Reachability
  • "GoogleUtilities/NSData+zlib (8.0.2)":
    • GoogleUtilities/Privacy
  • GoogleUtilities/Privacy (8.0.2)
  • GoogleUtilities/Reachability (8.0.2):
    • GoogleUtilities/Logger
    • GoogleUtilities/Privacy
  • GoogleUtilities/UserDefaults (8.0.2):
    • GoogleUtilities/Logger
    • GoogleUtilities/Privacy
  • GSKStretchyHeaderView (1.0.4)
  • GTMAppAuth (4.1.1):
    • AppAuth/Core (~> 1.7)
    • GTMSessionFetcher/Core (< 4.0, >= 3.3)
  • GTMSessionFetcher/Core (3.5.0)
    ....

DEPENDENCIES:

  • Firebase/Analytics
  • Firebase/Auth
  • Firebase/Crashlytics
  • Firebase/RemoteConfig
  • GoogleSignIn
  • GoogleTagManager
    ...

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseAppCheckInterop
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseCrashlytics
- FirebaseInstallations
- FirebaseRemoteConfig
- FirebaseRemoteConfigInterop
- FirebaseSessions
- FirebaseSharedSwift
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleSignIn
- GoogleTagManager
- GoogleUtilities
- GSKStretchyHeaderView
- GTMAppAuth
- GTMSessionFetcher
...

SPEC CHECKSUMS:
Firebase: fdb3bd378401f26a7adfcf446b0a630f8c20c0e8
FirebaseABTesting: c2e22c3aab99afa81d0561708b2c1c356c556976
FirebaseAnalytics: 9fcdb2e9844174bb405b34cc47092c9b91993d83
FirebaseAppCheckInterop: e59b52f2c0e188e6ba77b9e3f6acead2117f2abf
FirebaseAuth: 7348b13e29d46f4a9aa9a343cffa80449db8b116
FirebaseAuthInterop: 49e8faefaf254ce578e278a84a8fe0aebe23b546
FirebaseCore: 6e2a2782e234b14d48e880ed369ac55cda87fed7
FirebaseCoreExtension: aa5c9779c2d0d39d83f1ceb3fdbafe80c4feecfa
FirebaseCoreInternal: adefedc9a88dbe393c4884640a73ec9e8e790f8c
FirebaseCrashlytics: 95cfe27373ff2edab39c28583d93cbf2dfff401d
FirebaseInstallations: d0a8fea5a6fa91abc661591cf57c0f0d70863e57
FirebaseRemoteConfig: 05521e937b72e01847a7128da5a492327364c705
FirebaseRemoteConfigInterop: abf8b1bbc0bf1b84abd22b66746926410bf91a87
FirebaseSessions: 78f137e68dc01ca71606169ba4ac73b98c13752a
FirebaseSharedSwift: 260a35e08943ec810d820a70bc0359136351d0c5
GoogleAppMeasurement: 8bb20efc67c8fc1cff9c42a06c256caf55289bbf
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleSignIn: ce8c89bb9b37fb624b92e7514cc67335d1e277e4
GoogleTagManager: 05f257a9afe6e1d6da24f0ee37ab255ce34108b6
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
GSKStretchyHeaderView: 9743704c12bdc9cf7c7947bad3af8bf24f7061e3
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
....

PODFILE CHECKSUM: ...

COCOAPODS: 1.15.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions