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

Firebase crashing when checking for dynamic links at launch (iOS 16.2)

Open joaopdcgarcia opened this issue 1 year ago • 2 comments

Description

After upgrading FirebaseDynamicLinks cocoapod from 10.1.0 to 10.3.0 and releasing a TestFlight build using xcode 13.4.1, one of our remote QA testers is getting this crash -- which only him is able to replicate.

It happens at launch. Here's the stack trace:

CrashReporter Key:  1856c41b252c12e400b67c3fba3c0c0444155815
Hardware Model:     iPhone12,1
Process:            App
Identifier:         com.xxx.xx
Version:            3.10.0
Role:               Foreground
OS Version:         iOS 16.2
Exception Type:     EXC_BREAKPOINT 
Exception Subtype:  KERN_INVALID_ADDRESS


EXC_BREAKPOINT: 

0  WebKit +0x16538                <redacted>
1  WebKit +0x221f30               <redacted>
2  libc++.1.dylib +0xf19c         std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*))
3  WebKit +0x219f5c               <redacted>
4  WebKit +0x33e0                 <redacted>
5  WebKit +0xbb8c                 <redacted>
6  App +0x3fd4d4              -[FIRDLJavaScriptExecutor start] (FIRDLJavaScriptExecutor.m:94:16)
7  App +0x3fd450              -[FIRDLJavaScriptExecutor initWithDelegate:script:] (FIRDLJavaScriptExecutor.m:71:5)
8  App +0x3fd1e8              -[FIRDLDefaultRetrievalProcessV2 fetchLocaleFromWebView] (FIRDLDefaultRetrievalProcessV2.m:249:17)
9  App +0x401498              -[FIRDynamicLinks checkForPendingDynamicLink] (FIRDynamicLinks.m:310:3)
10 App +0x400b00              __39+[FIRDynamicLinks componentsToRegister]_block_invoke (FIRDynamicLinks.m:134:7)
11 App +0x3e4074              -[FIRComponentContainer instantiateInstanceForProtocol:withBlock:] (FIRComponentContainer.m:148:17)
12 App +0x3e4238              -[FIRComponentContainer instanceForProtocol:] (FIRComponentContainer.m:187:24)
13 App +0x3e3f6c              -[FIRComponentContainer instantiateEagerComponents] (FIRComponentContainer.m:125:36)
14 App +0x3e0840              +[FIRApp configureWithName:options:] (FIRApp.m:196:5)
15 App +0x3e0454              +[FIRApp configureWithOptions:] (FIRApp.m:129:3)
16 App +0x987d0               FirebaseManager.().init() (FirebaseManager.swift:47:21)
17 App +0x98cec               FirebaseManager.__allocating_init() (FirebaseManager.swift)
18 libdispatch.dylib +0x3fd8      <redacted>
19 libdispatch.dylib +0x5824      <redacted>
20 App +0x295d1c              FirebaseManager.shared.unsafeMutableAddressor (FirebaseManager.swift:83:16)
21 App +0x2455f0              closure #1 in NetworkManager.prefetchImages() (NetworkManager.swift:502:50)
22 App +0x63680               thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
23 libdispatch.dylib +0x24b0      <redacted>
24 libdispatch.dylib +0x3fd8      <redacted>
25 libdispatch.dylib +0xb690      <redacted>
26 libdispatch.dylib +0xc1dc      <redacted>
27 libdispatch.dylib +0x16e0c     <redacted>
28 libsystem_pthread.dylib +0xdf4 _pthread_wqthread
``

### Reproducing the issue

_No response_

### Firebase SDK Version

10.3.0

### Xcode Version

13.4.1

### Installation Method

CocoaPods

### Firebase Product(s)

DynamicLinks

### Targeted Platforms

iOS

### Relevant Log Output

_No response_

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

<!--- Look below for instructions on how to share your Package.resolved. --->

<details>
<summary>Expand <code>Package.resolved</code> snippet</summary>
<br>

```json

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

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

PODS:
  - Alamofire (5.6.4)
  - Amplitude (8.14.0):
    - AnalyticsConnector (~> 1.0.0)
  - AnalyticsConnector (1.0.0)
  - AppsFlyerFramework (6.9.1):
    - AppsFlyerFramework/Main (= 6.9.1)
  - AppsFlyerFramework/Main (6.9.1)
  - Bugsnag (6.25.1)
  - BugsnagNetworkRequestPlugin (6.25.1):
    - Bugsnag (~> 6.13)
  - DynamicBlurView (4.1.0)
  - Firebase/Core (10.3.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (~> 10.3.0)
  - Firebase/CoreOnly (10.3.0):
    - FirebaseCore (= 10.3.0)
  - Firebase/DynamicLinks (10.3.0):
    - Firebase/CoreOnly
    - FirebaseDynamicLinks (~> 10.3.0)
  - FirebaseAnalytics (10.3.0):
    - FirebaseAnalytics/AdIdSupport (= 10.3.0)
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseAnalytics/AdIdSupport (10.3.0):
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleAppMeasurement (= 10.3.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseCore (10.3.0):
    - FirebaseCoreInternal (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/Logger (~> 7.8)
  - FirebaseCoreInternal (10.3.0):
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseDynamicLinks (10.3.0):
    - FirebaseCore (~> 10.0)
  - FirebaseInstallations (10.3.0):
    - FirebaseCore (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/UserDefaults (~> 7.8)
    - PromisesObjC (~> 2.1)
  - Fuse (1.4.0)
  - GoogleAppMeasurement (10.3.0):
    - GoogleAppMeasurement/AdIdSupport (= 10.3.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/AdIdSupport (10.3.0):
    - GoogleAppMeasurement/WithoutAdIdSupport (= 10.3.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/WithoutAdIdSupport (10.3.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleUtilities/AppDelegateSwizzler (7.10.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (7.10.0):
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.10.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (7.10.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (7.10.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (7.10.0)"
  - GoogleUtilities/Reachability (7.10.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (7.10.0):
    - GoogleUtilities/Logger
  - Mixpanel-swift (4.0.4):
    - Mixpanel-swift/Complete (= 4.0.4)
  - Mixpanel-swift/Complete (4.0.4)
  - nanopb (2.30909.0):
    - nanopb/decode (= 2.30909.0)
    - nanopb/encode (= 2.30909.0)
  - nanopb/decode (2.30909.0)
  - nanopb/encode (2.30909.0)
  - NVActivityIndicatorView (5.1.1):
    - NVActivityIndicatorView/Base (= 5.1.1)
  - NVActivityIndicatorView/Base (5.1.1)
  - PopupDialog (1.1.1):
    - DynamicBlurView (~> 4.0)
  - PromiseKit (6.18.1):
    - PromiseKit/CorePromise (= 6.18.1)
    - PromiseKit/Foundation (= 6.18.1)
    - PromiseKit/UIKit (= 6.18.1)
  - PromiseKit/CorePromise (6.18.1)
  - PromiseKit/Foundation (6.18.1):
    - PromiseKit/CorePromise
  - PromiseKit/UIKit (6.18.1):
    - PromiseKit/CorePromise
  - PromisesObjC (2.1.1)
  - Purchases (3.14.3):
    - PurchasesCoreSwift (= 3.14.3)
  - PurchasesCoreSwift (3.14.3)
  - ReachabilitySwift (5.0.0)
  - Realm (10.33.0):
    - Realm/Headers (= 10.33.0)
  - Realm/Headers (10.33.0)
  - RealmSwift (10.33.0):
    - Realm (= 10.33.0)
  - SDWebImage (5.14.2):
    - SDWebImage/Core (= 5.14.2)
  - SDWebImage/Core (5.14.2)
  - SGCommon (1.3.42):
    - ReachabilitySwift
    - SnapKit (~> 5.6.0)
    - youtube-ios-player-helper
  - SnapKit (5.6.0)
  - SwiftFormat/CLI (0.49.9)
  - SwiftLint (0.50.3)
  - SwiftNotificationCenter (1.0.4)
  - SwiftyBeaver (1.9.5)
  - youtube-ios-player-helper (1.0.4)

DEPENDENCIES:
  - Alamofire
  - Amplitude
  - AppsFlyerFramework
  - Bugsnag
  - BugsnagNetworkRequestPlugin
  - Firebase/Core
  - Firebase/DynamicLinks
  - "Fuse (from `[email protected]/fuse-swift.git`, branch `master`)"
  - Mixpanel-swift
  - NVActivityIndicatorView
  - PopupDialog
  - PromiseKit
  - Purchases
  - ReachabilitySwift
  - RealmSwift
  - SDWebImage
  - "SGCommon (from `[email protected]/sg_common_iOS.git`, branch `feature/sc-21695-add_sgpromotions_initializer`)"
  - SnapKit
  - SwiftFormat/CLI (from `https://github.com/calda/SwiftFormat.git`, tag `0.49.10-beta-1`)
  - SwiftLint
  - SwiftNotificationCenter
  - SwiftyBeaver

SPEC REPOS:
  trunk:
    - Alamofire
    - Amplitude
    - AnalyticsConnector
    - AppsFlyerFramework
    - Bugsnag
    - BugsnagNetworkRequestPlugin
    - DynamicBlurView
    - Firebase
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseCoreInternal
    - FirebaseDynamicLinks
    - FirebaseInstallations
    - GoogleAppMeasurement
    - GoogleUtilities
    - Mixpanel-swift
    - nanopb
    - NVActivityIndicatorView
    - PopupDialog
    - PromiseKit
    - PromisesObjC
    - Purchases
    - PurchasesCoreSwift
    - ReachabilitySwift
    - Realm
    - RealmSwift
    - SDWebImage
    - SnapKit
    - SwiftLint
    - SwiftNotificationCenter
    - SwiftyBeaver
    - youtube-ios-player-helper

EXTERNAL SOURCES:
  Fuse:
    :branch: master
    :git: "[email protected]/fuse-swift.git"
  SGCommon:
    :branch: feature/sc-21695-add_sgpromotions_initializer
    :git: "[email protected]/sg_common_iOS.git"
  SwiftFormat:
    :git: https://github.com/calda/SwiftFormat.git
    :tag: 0.49.10-beta-1

CHECKOUT OPTIONS:
  Fuse:
    :commit: 08390604a8a02c95c6823f908befdec053cf567c
    :git: "[email protected]/fuse-swift.git"
  SGCommon:
    :commit: 156a666e096228c3b7a11dd12bcd21634093af6d
    :git: "[email protected]/sg_common_iOS.git"
  SwiftFormat:
    :git: https://github.com/calda/SwiftFormat.git
    :tag: 0.49.10-beta-1

SPEC CHECKSUMS:
  Alamofire: 4e95d97098eacb88856099c4fc79b526a299e48c
  Amplitude: bff4ceaad2a79e908682134d75dc862960594ea6
  AnalyticsConnector: 4c386d5972ac9da86e22d668564dbbac97558754
  AppsFlyerFramework: dc9aa675faa8e1a2ed40fb295d3c5408ee2b972a
  Bugsnag: b10579241f2b7ae6f7c6b04f587c33b38ec5dca7
  BugsnagNetworkRequestPlugin: 4aa298c51247df69cbb1f13dd666dbf1e3f3f5b0
  DynamicBlurView: 58e18fae80bb614e34681a4486870e7d257b62e8
  Firebase: f92fc551ead69c94168d36c2b26188263860acd9
  FirebaseAnalytics: 036232b6a1e2918e5f67572417be1173576245f3
  FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a
  FirebaseCoreInternal: 29b76f784d607df8b2a1259d73c3f04f1210137b
  FirebaseDynamicLinks: 51c81d07bd63155bb56d76b0abdda79c8a3d8d02
  FirebaseInstallations: e2f26126089dcf41e215f7b8925af8d953c7d602
  Fuse: 48eaf66d0c407c7f8b0ddb168888dc4637e87f14
  GoogleAppMeasurement: c7d6fff39bf2d829587d74088d582e32d75133c3
  GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
  Mixpanel-swift: 95fa64d39f15141f1c5b7797003e2123d4c3207e
  nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
  NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667
  PopupDialog: 720c92befd8bc23c13442254945213db5612f149
  PromiseKit: 49d70c53d5d20e346beaea4b276b5dd2ab446bb4
  PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
  Purchases: ba5a570357564da5d5447281190b5ac5ab9b8f3e
  PurchasesCoreSwift: 78a2001158d7fed44f9796ea50b89152ba727520
  ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
  Realm: d4f810e161fa2c2c589b9860b6eb09238deacd73
  RealmSwift: cef9946f09f2333a8f2ac8bac4f8de52fb9f5ac3
  SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84
  SGCommon: 6c07a4f0acd0366b698d833ed7be5a3e9f9c137b
  SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
  SwiftFormat: 016c15401d06959ef9f81d7956462e91f55b8ac5
  SwiftLint: 77f7cb2b9bb81ab4a12fcc86448ba3f11afa50c6
  SwiftNotificationCenter: 760386da2ce03d3594cb5e96d1e22ec80b44b46f
  SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
  youtube-ios-player-helper: e9b97535e816db3152179d84d999bc1807ecd689

PODFILE CHECKSUM: 41cb2faee9369bb7516d1980174af2d2d55092dc

COCOAPODS: 1.11.3

joaopdcgarcia avatar Dec 16 '22 16:12 joaopdcgarcia

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 16 '22 16:12 google-oss-bot

Thanks for filing this, @joaopdcgarcia. It looks like your stack trace and scenario is quite similar to #10587.

rizafran avatar Dec 19 '22 15:12 rizafran

The Firebase Dynamic Links service will be shutdown on August 25, 2025. In the meantime, only critical or security issues will be fixed in the SDK.

More at https://firebase.google.com/support/dynamic-links-faq

paulb777 avatar Aug 22 '23 16:08 paulb777