Skip to content

Auth crash -[FIRAuth fetchSignInMethodsForEmail:completion:] #4561

@mikehardy

Description

@mikehardy
  • Xcode version: 11.3
  • Firebase SDK version: 6.13.0
  • Firebase Component: Auth
  • Component version: 6.4.0 (per Podfile.lock)

[REQUIRED] Step 3: Describe the problem

Crash on iOS when calling fetchSignMethodsForEmail

Seen on

  • 13.1.3 (17A878) iPhone XR
  • 12.4.0 (16G77) iPhone 8 Plus
Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1a9f01c30 __exceptionPreprocess
1  libobjc.A.dylib                0x1a9c1c0c8 objc_exception_throw
2  CoreFoundation                 0x1a9f5a5f4 -[__NSCFString characterAtIndex:].cold.1
3  CoreFoundation                 0x1a9f64414 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.5
4  CoreFoundation                 0x1a9de85f0 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
5  CoreFoundation                 0x1a9dd9e9c +[NSDictionary dictionaryWithObjects:forKeys:count:]
6  KScoreApp                      0x104fae4e8 -[FIRCreateAuthURIRequest unencodedHTTPRequestBodyWithError:] + 75 (FIRCreateAuthURIRequest.m:75)
7  KScoreApp                      0x104fa4ac4 -[FIRAuthBackendRPCImplementation postWithRequest:response:callback:] + 833 (FIRAuthBackend.m:833)
8  KScoreApp                      0x104fa3600 -[FIRAuthBackendRPCImplementation createAuthURI:callback:] + 600 (FIRAuthBackend.m:600)
9  KScoreApp                      0x104fa2778 +[FIRAuthBackend createAuthURI:callback:] + 441 (FIRAuthBackend.m:441)
10 KScoreApp                      0x104f99068 __49-[FIRAuth fetchSignInMethodsForEmail:completion:]_block_invoke + 530 (FIRAuth.m:530)
11 libdispatch.dylib              0x1a9ba7bb0 _dispatch_call_block_and_release
12 libdispatch.dylib              0x1a9ba900c _dispatch_client_callout
13 libdispatch.dylib              0x1a9baf484 _dispatch_lane_serial_drain
14 libdispatch.dylib              0x1a9bafeb0 _dispatch_lane_invoke
15 libdispatch.dylib              0x1a9bb8f20 _dispatch_workloop_worker_thread
16 libsystem_pthread.dylib        0x1a9c0eaa0 _pthread_wqthread
17 libsystem_pthread.dylib        0x1a9c14c78 start_wqthread

Steps to reproduce:

What happened? How can we make the problem occur?

Hard to say, it appears to be medium-rare. But during my social auth sign-in flow, if it is the first time this account has been seen I first check if the email returned by the social auth sign-in is in use already before auto-registering.

It appears this can crash

Relevant Code:

It's using react-native-firebase (I'm a maintainer there) so the code won't appear relevant, but I don't believe a native crash should be possible under any circumstances, so hopefully not necessary? I am happy to assist in troubleshooting or providing any necessary follow-up information, please don't hesitate to ask.

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions