firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.67k stars 1.49k forks source link

iOS app crash on [FIRApp configure] #13027

Closed xipi000 closed 4 months ago

xipi000 commented 5 months ago

Description

When i run [FIRApp configure] method in application:didFinishLaunchingWithOptions,it crashed。the debug mode is Running well,but release mode crash Definitely。

Reproducing the issue

No response

Firebase SDK Version

10.26.0

Xcode Version

15.4

Installation Method

Carthage

Firebase Product(s)

Analytics, Crashlytics

Targeted Platforms

iOS

Relevant Log Output

CrashDoctor Diagnosis: Attempted to dereference garbage pointer 0x16de0222c.
Thread 0 Crashed:
0   nanopb                              0x0000000105d86904 0x105d80000 + 26884
1   nanopb                              0x0000000105d86254 0x105d80000 + 25172
2   nanopb                              0x0000000105d86074 0x105d80000 + 24692
3   FirebaseSessions                    0x00000001058ac13c 0x1058a8000 + 16700
4   FirebaseSessions                    0x00000001058b6f10 0x1058a8000 + 61200
5   FirebaseSessions                    0x00000001058b7198 0x1058a8000 + 61848
6   GoogleDataTransport                 0x000000010590dfd0 0x105900000 + 57296
7   GoogleDataTransport                 0x000000010590de60 0x105900000 + 56928
8   GoogleDataTransport                 0x000000010591b448 0x105900000 + 111688
9   FirebaseSessions                    0x00000001058b274c 0x1058a8000 + 42828
10  FirebaseSessions                    0x00000001058adefc 0x1058a8000 + 24316
11  FirebaseSessions                    0x00000001058adf80 0x1058a8000 + 24448
12  FirebaseSessions                    0x00000001058b50c8 0x1058a8000 + 53448
13  FirebaseSessions                    0x00000001058b52c8 0x1058a8000 + 53960
14  FirebaseSessions                    0x00000001058b2afc 0x1058a8000 + 43772
15  FirebaseSessions                    0x00000001058b29c0 0x1058a8000 + 43456
16  FirebaseInstallations               0x000000010586c9c0 0x105868000 + 18880
17  FBLPromises                         0x00000001056ed138 0x1056e8000 + 20792
18  libdispatch.dylib                   0x00000001af5cc13c 0x1af5ca000 + 8508
19  libdispatch.dylib                   0x00000001af5cddd4 0x1af5ca000 + 15828
20  libdispatch.dylib                   0x00000001af5dc5ec 0x1af5ca000 + 75244
21  libdispatch.dylib                   0x00000001af5dc1b8 0x1af5ca000 + 74168
22  CoreFoundation                      0x00000001a76fb710 0x1a76a5000 + 354064
23  CoreFoundation                      0x00000001a76f8914 0x1a76a5000 + 342292
24  CoreFoundation                      0x00000001a76f7cd8 0x1a76a5000 + 339160
25  GraphicsServices                    0x00000001ec5a81a8 0x1ec5a7000 + 4520
26  UIKitCore                           0x00000001a9d3090c 0x1a9926000 + 4237580
27  UIKitCore                           0x00000001a9de49d0 0x1a9926000 + 4975056
28  HideApp                             0x0000000104b0ad04 0x104a44000 + 814340
29  (null) 0x00000001cada9e4c 0x0 + 7698292300

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

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 5 months ago

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

paulb777 commented 5 months ago

This looks like https://github.com/firebase/firebase-ios-sdk/issues/11403. It was fixed in 10.22.0.

Please make sure you remove and update all the Firebase binaries to the latest version.

Vikrant2411 commented 5 months ago

Hi, I am getting the nanopb related crashes on version 10.27.0. Have anyone found any solution for this? Please let me know because there are several crashes reported related nanopb.

Logs from Crashlytics:-

Crashed: com.apple.main-thread
0  nanopb                         0x6194 encode_field + 244
1  nanopb                         0x6074 pb_encode + 172
2  FirebaseSessions               0x413c FIRSESEncodeProto + 64
3  FirebaseSessions               0xf04c $s16FirebaseSessions17SessionStartEventC14transportBytes10Foundation4DataVyF + 232
4  FirebaseSessions               0xf2d4 $s16FirebaseSessions17SessionStartEventC14transportBytes10Foundation4DataVyFTo + 28
5  GoogleDataTransport            0x9e78 -[GDTCOREvent setDataObject:] + 68
6  FirebaseSessions               0x5e48 $s16FirebaseSessions14EventGDTLoggerC03logC05event10completionyAA012SessionStartC0C_ys6ResultOyyts5Error_pGctF + 104
7  FirebaseSessions               0x5f44 $s16FirebaseSessions14EventGDTLoggerCAA0cD8ProtocolA2aDP03logC05event10completionyAA012SessionStartC0C_ys6ResultOyyts5Error_pGctFTW + 20
8  FirebaseSessions               0xd1c4 $s16FirebaseSessions18SessionCoordinatorC014attemptLoggingC5Start5event8callbackyAA0cG5EventC_ys6ResultOyytAA0aB5ErrorOGctFyAMcfU_ + 176
9  FirebaseSessions               0xd3c4 $s16FirebaseSessions18SessionCoordinatorC10fillInFIID33_A99E81F187A7BA47A5374F4DC053A423LL5event8callbackyAA0C10StartEventC_ys6ResultOyytAA0aB5ErrorOGctFyAKySSs0V0_pGcfU_ + 180
10 FirebaseSessions               0xabe4 $sSo16FIRInstallationsC16FirebaseSessionsE14installationID10completionyys6ResultOySSs5Error_pGc_tFySSSg_sAH_pSgtcfU_TA + 48
11 FirebaseSessions               0xaaa8 $sSSSgs5Error_pSgIeggg_So8NSStringCSgSo7NSErrorCSgIeyByy_TR + 96
12 FirebaseInstallations          0x49bc __49-[FIRInstallations installationIDWithCompletion:]_block_invoke + 56
13 FBLPromises                    0x5130 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.18 + 52
14 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
15 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
16 libdispatch.dylib              0x125ec _dispatch_main_queue_drain + 1060
17 libdispatch.dylib              0x121b8 _dispatch_main_queue_callback_4CF + 44
18 CoreFoundation                 0x3751c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
19 CoreFoundation                 0x34218 __CFRunLoopRun + 1996
20 CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
21 GraphicsServices               0x34e0 GSEventRunModal + 164
22 UIKitCore                      0x22aedc -[UIApplication _run] + 888
23 UIKitCore                      0x22a518 UIApplicationMain + 340
24 Al Ain Water                   0xde240 main + 25 (AppDelegate.swift:25)
25 ???                            0x1b23b6d84 (Missing)
paulb777 commented 5 months ago

@Vikrant2411 The backtrace matches @12632 that was fixed in 10.22.0. Please make sure a full rebuild is done with a newer version.

Vikrant2411 commented 5 months ago

@paulb777 I have removed the Pods and then installed them again. Is there anything else for the full rebuild which i am missing?

paulb777 commented 5 months ago

@Vikrant2411 Clearing DerivedData sometimes can address build issues.

Also, this issue is about a zip distribution. If you're seeing the issue with CocoaPods, please create another issue with the template filled out.

google-oss-bot commented 5 months ago

Hey @xipi000. 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 commented 4 months ago

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

@xipi000 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.

fanthus commented 4 months ago

I meet same issue, Firebase/Analytics has been updated to 10.28.0, and have clean the DerivedData folder.

this issue only crash in release configuration, and It's not a crash that occurs every time.

image

Below is my firebase sdk related dependency


 - Firebase/Analytics (10.28.0):
    - Firebase/Core
  - Firebase/Core (10.28.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (~> 10.28.0)
  - Firebase/CoreOnly (10.28.0):
    - FirebaseCore (= 10.28.0)
  - FirebaseAnalytics (10.28.0):
    - FirebaseAnalytics/AdIdSupport (= 10.28.0)
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.11)
    - GoogleUtilities/MethodSwizzler (~> 7.11)
    - GoogleUtilities/Network (~> 7.11)
    - "GoogleUtilities/NSData+zlib (~> 7.11)"
    - nanopb (< 2.30911.0, >= 2.30908.0)
  - FirebaseAnalytics/AdIdSupport (10.28.0):
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleAppMeasurement (= 10.28.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.11)
    - GoogleUtilities/MethodSwizzler (~> 7.11)
    - GoogleUtilities/Network (~> 7.11)
    - "GoogleUtilities/NSData+zlib (~> 7.11)"
    - nanopb (< 2.30911.0, >= 2.30908.0)
  - FirebaseAppCheckInterop (10.19.0)
  - FirebaseAuth (10.19.0):
    - FirebaseAppCheckInterop (~> 10.17)
    - FirebaseCore (~> 10.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/Environment (~> 7.8)
    - GTMSessionFetcher/Core (< 4.0, >= 2.1)
    - RecaptchaInterop (~> 100.0)
  - FirebaseCore (10.28.0):
    - FirebaseCoreInternal (~> 10.0)
    - GoogleUtilities/Environment (~> 7.12)
    - GoogleUtilities/Logger (~> 7.12)
  - FirebaseCoreExtension (10.19.0):
    - FirebaseCore (~> 10.0)
  - FirebaseCoreInternal (10.19.0):
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseCrashlytics (10.19.0):
    - FirebaseCore (~> 10.5)
    - FirebaseInstallations (~> 10.0)
    - FirebaseSessions (~> 10.5)
    - GoogleDataTransport (~> 9.2)
    - GoogleUtilities/Environment (~> 7.8)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesObjC (~> 2.1)
  - FirebaseInstallations (10.19.0):
    - FirebaseCore (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/UserDefaults (~> 7.8)
    - PromisesObjC (~> 2.1)
  - FirebaseSessions (10.19.0):
    - FirebaseCore (~> 10.5)
    - FirebaseCoreExtension (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleDataTransport (~> 9.2)
    - GoogleUtilities/Environment (~> 7.10)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesSwift (~> 2.1)```
fanthus commented 4 months ago

I found that FirebaseCrashlytics not updated to newest version. When I updated all firebase related libs the launch crash dismissed.