firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

RefreshAuthToken crash

Open ttcloud opened this issue 11 months ago • 7 comments

Description

Image We’ve encountered a crash related to Firebase's refreshAuthToken method, which has already affected three users. The crash seems to occur when attempting to refresh the authentication token. This issue is preventing users from successfully authenticating or maintaining their session, leading to interruptions in app usage.

Reproducing the issue

  • A user is logged into the app.
  • The app attempts to refresh the authentication token via Firebase’s refreshAuthToken method.
  • The app crashes unexpectedly, with the following error (or behavior): (Include any error messages or logs if available)

Firebase SDK Version

11.6

Xcode Version

16.1

Installation Method

CocoaPods

Firebase Product(s)

Messaging

Targeted Platforms

iOS

Relevant Log Output


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

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

ttcloud avatar Dec 20 '24 06:12 ttcloud

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

google-oss-bot avatar Dec 20 '24 06:12 google-oss-bot

Thanks for reaching out, @ttcloud. I'm wondering if you have made any changes before this issue has occurred?

rizafran avatar Dec 20 '24 17:12 rizafran

Also, please share the Podfile.lock.

paulb777 avatar Dec 20 '24 18:12 paulb777

  • FBSDKCoreKit (5.2.3):
    • FBSDKCoreKit/Basics (= 5.2.3)
    • FBSDKCoreKit/Core (= 5.2.3)
  • FBSDKCoreKit/Basics (5.2.3)
  • FBSDKCoreKit/Core (5.2.3):
    • FBSDKCoreKit/Basics
  • FBSDKLoginKit (5.2.3):
    • FBSDKCoreKit (~> 5.0)
  • FCAlertView (1.4.2)
  • Firebase (11.6.0):
    • Firebase/Core (= 11.6.0)
  • Firebase/Analytics (11.6.0):
    • Firebase/Core
  • Firebase/Auth (11.6.0):
    • Firebase/CoreOnly
    • FirebaseAuth (~> 11.6.0)
  • Firebase/Core (11.6.0):
    • Firebase/CoreOnly
    • FirebaseAnalytics (~> 11.6.0)
  • Firebase/CoreOnly (11.6.0):
    • FirebaseCore (~> 11.6.0)
  • Firebase/Crashlytics (11.6.0):
    • Firebase/CoreOnly
    • FirebaseCrashlytics (~> 11.6.0)
  • Firebase/Database (11.6.0):
    • Firebase/CoreOnly
    • FirebaseDatabase (~> 11.6.0)
  • Firebase/Functions (11.6.0):
    • Firebase/CoreOnly
    • FirebaseFunctions (~> 11.6.0)
  • Firebase/InAppMessaging (11.6.0):
    • Firebase/CoreOnly
    • FirebaseInAppMessaging (~> 11.6.0-beta)
  • Firebase/Messaging (11.6.0):
    • Firebase/CoreOnly
    • FirebaseMessaging (~> 11.6.0)
  • Firebase/Performance (11.6.0):
    • Firebase/CoreOnly
    • FirebasePerformance (~> 11.6.0)
  • Firebase/Storage (11.6.0):
    • Firebase/CoreOnly
    • FirebaseStorage (~> 11.6.0)
  • FirebaseABTesting (11.6.0):
    • FirebaseCore (~> 11.6.0)
  • FirebaseAnalytics (11.6.0):
    • FirebaseAnalytics/AdIdSupport (= 11.6.0)
    • FirebaseCore (~> 11.6.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.6.0):
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleAppMeasurement (= 11.6.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/Network (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
    • nanopb (~> 3.30910.0)
  • FirebaseAppCheckInterop (11.6.0)
  • FirebaseAuth (11.6.0):
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseAuthInterop (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseCoreExtension (~> 11.6.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GTMSessionFetcher/Core (< 5.0, >= 3.4)
    • RecaptchaInterop (~> 100.0)
  • FirebaseAuthInterop (11.6.0)
  • FirebaseCore (11.6.0):
    • FirebaseCoreInternal (~> 11.6.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/Logger (~> 8.0)
  • FirebaseCoreExtension (11.6.0):
    • FirebaseCore (~> 11.6.0)
  • FirebaseCoreInternal (11.6.0):
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
  • FirebaseCrashlytics (11.6.0):
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • FirebaseRemoteConfigInterop (~> 11.0)
    • FirebaseSessions (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/Environment (~> 8.0)
    • nanopb (~> 3.30910.0)
    • PromisesObjC (~> 2.4)
  • FirebaseDatabase (11.6.0):
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseSharedSwift (~> 11.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • leveldb-library (~> 1.22)
  • FirebaseFunctions (11.6.0):
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseAuthInterop (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseCoreExtension (~> 11.6.0)
    • FirebaseMessagingInterop (~> 11.0)
    • FirebaseSharedSwift (~> 11.0)
    • GTMSessionFetcher/Core (< 5.0, >= 3.4)
  • FirebaseInAppMessaging (11.6.0-beta):
    • FirebaseABTesting (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • nanopb (~> 3.30910.0)
  • FirebaseInstallations (11.6.0):
    • FirebaseCore (~> 11.6.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • PromisesObjC (~> 2.4)
  • FirebaseMessaging (11.6.0):
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/Reachability (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • nanopb (~> 3.30910.0)
  • FirebaseMessagingInterop (11.6.0)
  • FirebasePerformance (11.6.0):
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • FirebaseRemoteConfig (~> 11.0)
    • FirebaseSessions (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/MethodSwizzler (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • nanopb (~> 3.30910.0)
  • FirebaseRemoteConfig (11.6.0):
    • FirebaseABTesting (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • FirebaseRemoteConfigInterop (~> 11.0)
    • FirebaseSharedSwift (~> 11.0)
    • GoogleUtilities/Environment (~> 8.0)
    • "GoogleUtilities/NSData+zlib (~> 8.0)"
  • FirebaseRemoteConfigInterop (11.6.0)
  • FirebaseSessions (11.6.0):
    • FirebaseCore (~> 11.6.0)
    • FirebaseCoreExtension (~> 11.6.0)
    • FirebaseInstallations (~> 11.0)
    • GoogleDataTransport (~> 10.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GoogleUtilities/UserDefaults (~> 8.0)
    • nanopb (~> 3.30910.0)
    • PromisesSwift (~> 2.1)
  • FirebaseSharedSwift (11.6.0)
  • FirebaseStorage (11.6.0):
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseAuthInterop (~> 11.0)
    • FirebaseCore (~> 11.6.0)
    • FirebaseCoreExtension (~> 11.6.0)
    • GoogleUtilities/Environment (~> 8.0)
    • GTMSessionFetcher/Core (< 5.0, >= 3.4) @paulb777 @rizafran

ttcloud avatar Dec 23 '24 02:12 ttcloud

Thanks for reaching out, @ttcloud. I'm wondering if you have made any changes before this issue has occurred?

No other changes, only update firebase

ttcloud avatar Dec 23 '24 02:12 ttcloud

Thanks for the info, @ttcloud. Could you provide the following:

  • Exact error message received when trying to refresh the token
  • Confirmation if the issue is reproducible using other network
  • MCVE that reproduces the issue, if possible

rizafran avatar Jan 07 '25 14:01 rizafran

@rizafran any ETA to fix this?

jesus-mg-ios avatar Jan 10 '25 10:01 jesus-mg-ios

Hey @ttcloud. 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!

google-oss-bot avatar Jan 17 '25 02:01 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@ttcloud if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jan 24 '25 02:01 google-oss-bot

I'm still experiencing it.

jesus-mg-ios avatar Jan 24 '25 13:01 jesus-mg-ios

Hi @jesus-mg-ios, please provide the info mentioned in https://github.com/firebase/firebase-ios-sdk/issues/14277#issuecomment-2575402693. Thanks.

rizafran avatar Feb 03 '25 16:02 rizafran

  1. Exact error message received when trying to refresh the token: => Crash Kern Invalid Address

  2. Confirmation if the issue is reproducible using other network: I think it is not related to network, possible causes: => Dereferencing a Null or Uninitialized Pointer - Attempting to read or write memory that hasn't been properly allocated. => Buffer Overflow – Accessing memory beyond the allocated range. => Use-After-Free – Trying to access memory after it has been deallocated. => Stack or Heap Corruption – Writing out of bounds can corrupt memory structures. => Incorrect Memory Mapping – Using calloc or malloc incorrectly.

  3. MCVE that reproduces the issue, if possible: Not viable @rizafran

jesus-mg-ios avatar Feb 03 '25 16:02 jesus-mg-ios