Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Firebase Auth through a second Firebase app: FIRAuthBackend.m - Line 628 +[FIRAuthBackend verifyCustomToken:callback:] in Release Builds #14364

Open
weilu3 opened this issue Jan 20, 2025 · 7 comments

Comments

@weilu3
Copy link

weilu3 commented Jan 20, 2025

Description

Hello Firebase Team,

I am encountering a crash when using Firebase Authentication with a secondary Firebase app instance in my iOS project. This issue occurs exclusively in release builds, while it works fine in debug builds. The Crashlytics report pinpoints the following location in the Firebase SDK as the cause of the crash:

FIRAuthBackend.m - Line 628 +[FIRAuthBackend verifyCustomToken:callback:]

Steps to Reproduce:

  1. Add and configure a secondary Firebase app instance in the iOS project.
  2. Call the verifyCustomToken authentication method with a verified user using the secondary Firebase app.
  3. Build the app in release mode and run it on a physical device.
  4. Observe the crash during the authentication process.

Observed Behavior:
The app crashes when calling the verifyCustomToken method through the secondary Firebase app instance in release builds.
No crashes occur in debug builds.

Expected Behavior:
The verifyCustomToken method should function correctly in both release and debug builds without crashing.
Additional Context:

SDK Version: 11.7.0.
iOS Version: 18.2.1, 16.6.1, 18.1.1
Devices: iPhone 14 pro max, iPhone 15 pro max, iPhone SE

Image

Request: Please investigate this issue and provide a fix or guidance to address it. Let me know if you require any further information or additional debugging steps from my side.

Thank you for your time and support!

Reproducing the issue

  1. Add and configure a secondary Firebase app instance in the iOS project.
  2. Call the verifyCustomToken authentication method with a verified user using the secondary Firebase app.
  3. Build the app in release mode and run it on a physical device.
  4. Observe the crash during the authentication process.

Firebase SDK Version

11.7.0

Xcode Version

15.3

Installation Method

Swift Package Manager

Firebase Product(s)

Authentication, Crashlytics, Firestore, Functions, Remote Config

Targeted Platforms

iOS

Relevant Log Output

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

Expand Package.resolved snippet
  Firebase:
    url: https://github.com/firebase/firebase-ios-sdk
    majorVersion: 11.7.0

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

FIRAuthBackend.m was replaced in Firebase in 11.0.0. Please make sure your Firebase installation is up to date.

@weilu3
Copy link
Author

weilu3 commented Jan 21, 2025

FIRAuthBackend.m was replaced in Firebase in 11.0.0. Please make sure your Firebase installation is up to date.

Hi Paul,

Thank you very much for your quick response. You’re correct—the attached screenshot reflects the crash that occurred earlier when we were using version 10.24.0 of Firebase. However, after upgrading to the latest version (11.7.0), we are still encountering a crash within the Authentication SDK.

I’ve attached the latest Crashlytics report(from Jan 20) for your reference. Please let me know if there’s any additional information I can provide to help diagnose this issue.

Best regards,
Wei

Image

@paulb777
Copy link
Member

Thanks. Please update the Package.resolved section of the issue to include GTMSessionFetcher

@weilu3
Copy link
Author

weilu3 commented Jan 22, 2025

Thank you for your response.

We’ve narrowed down the issue to testing with our primary Firebase app (a single Firebase app instance in a barebones app) for authentication using email and password. The authentication process works as expected in the debug build but crashes in the release build.

I have upgraded the Firebase SDK to version 11.7.0, but the issue persists. Attached is a screenshot of the package.resolved file for reference, as requested.

Additionally, GTMSessionFetcher is one of the dependencies for the Firebase SDK, and I believe it is automatically included and resolved when we install the Firebase SDK via Swift Package Manager. Please correct me if I’m mistaken or let me know if it needs to be installed individually.

Let me know if you need additional details or further clarification to assist in resolving this issue.

Image Image

@paulb777
Copy link
Member

Hmm, I wonder if there is an issue with GTMSessionFetcher 3.x versus 4.x. Are you able to update to a more recent version?

@google-oss-bot
Copy link

Hey @weilu3. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants