firebase / firebase-ios-sdk

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

__InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 NSInvalidArgumentException - -[__NSCFString objectForKey:]: unrecognized selector sent to instance <address> #12415

Open shamiul110107 opened 6 months ago

shamiul110107 commented 6 months ago

Description

App is crashing only in production

Reproducing the issue

No response

Firebase SDK Version

9.0.0

Xcode Version

15.0

Installation Method

Swift Package Manager

Firebase Product(s)

Crashlytics, Performance, Remote Config

Targeted Platforms

iOS

Relevant Log Output

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0xec678 (Missing UUID 5a6c1f41bf7032f6a1d65b894dd21362)
1  libobjc.A.dylib                0x2bc80 objc_exception_throw
2  CoreFoundation                 0x17cfdc (Missing UUID 5a6c1f41bf7032f6a1d65b894dd21362)
3  CoreFoundation                 0x31d88 (Missing UUID 5a6c1f41bf7032f6a1d65b894dd21362)
4  CoreFoundation                 0x172950 (Missing UUID 5a6c1f41bf7032f6a1d65b894dd21362)
5  InsiderGeofence                0x6050 (Missing UUID d2c4233d1b3833b1b38cd1b45205ea7a)
6  InsiderMobile                  0x1dd80 (Missing UUID 8f7e49a3634731f1be1c551079aff910)
7  Major Cineplex                 0x7ed294 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 307 (FPRNSURLSessionInstrument.m:307)
8  Major Cineplex                 0x7ed294 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 307 (FPRNSURLSessionInstrument.m:307)
9  CFNetwork                      0xf288 (Missing UUID 650b083ce6403f12a26732148f1eb6b8)
10 CFNetwork                      0x2d18c (Missing UUID 650b083ce6403f12a26732148f1eb6b8)
11 libdispatch.dylib              0x26a8 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
12 libdispatch.dylib              0x4300 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
13 libdispatch.dylib              0xb894 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
14 libdispatch.dylib              0xc3f8 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
15 libdispatch.dylib              0x17004 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
16 libdispatch.dylib              0x16878 (Missing UUID c49a5fc2c87339139603004f5d0175e7)
17 libsystem_pthread.dylib        0x1964 (Missing UUID 8f9c865b29f5346badd5fde40e008c66)
18 libsystem_pthread.dylib        0x1a04 (Missing UUID 8f9c865b29f5346badd5fde40e008c66)

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

{
  "pins" : [
    {
      "identity" : "abseil-cpp-swiftpm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git",
      "state" : {
        "revision" : "583de9bd60f66b40e78d08599cc92036c2e7e4e1",
        "version" : "0.20220203.2"
      }
    },
    {
      "identity" : "alamofire",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/Alamofire/Alamofire",
      "state" : {
        "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa",
        "version" : "5.8.0"
      }
    },
    {
      "identity" : "boringssl-swiftpm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/boringssl-SwiftPM.git",
      "state" : {
        "revision" : "dd3eda2b05a3f459fc3073695ad1b28659066eab",
        "version" : "0.9.1"
      }
    },
    {
      "identity" : "closures",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/vhesener/Closures",
      "state" : {
        "revision" : "d42d1cea00b05fa6778e2a0e1601028b47a32f79",
        "version" : "0.7.0"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk.git",
      "state" : {
        "revision" : "7e80c25b51c2ffa238879b07fbfc5baa54bb3050",
        "version" : "9.6.0"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "c1cfde8067668027b23a42c29d11c246152fe046",
        "version" : "9.6.0"
      }
    },
    {
      "identity" : "googledatatransport",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleDataTransport.git",
      "state" : {
        "revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117",
        "version" : "9.3.0"
      }
    },
    {
      "identity" : "googleutilities",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleUtilities.git",
      "state" : {
        "revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3",
        "version" : "7.12.1"
      }
    },
    {
      "identity" : "grpc-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/grpc/grpc-ios.git",
      "state" : {
        "revision" : "8440b914756e0d26d4f4d054a1c1581daedfc5b6",
        "version" : "1.44.3-grpc"
      }
    },
    {
      "identity" : "gtm-session-fetcher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/gtm-session-fetcher.git",
      "state" : {
        "revision" : "5ccda3981422a84186387dbb763ba739178b529c",
        "version" : "2.3.0"
      }
    },
    {
      "identity" : "ios-branch-sdk-spm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/BranchMetrics/ios-branch-sdk-spm",
      "state" : {
        "revision" : "65dcd12e0107e1e1c464fabcd0ba29c577648650",
        "version" : "1.45.2"
      }
    },
    {
      "identity" : "keychainaccess",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/kishikawakatsumi/KeychainAccess",
      "state" : {
        "revision" : "84e546727d66f1adc5439debad16270d0fdd04e7",
        "version" : "4.2.2"
      }
    },
    {
      "identity" : "kingfisher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/onevcat/Kingfisher",
      "state" : {
        "revision" : "b6f62758f21a8c03cd64f4009c037cfa580a256e",
        "version" : "7.9.1"
      }
    },
    {
      "identity" : "leveldb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/leveldb.git",
      "state" : {
        "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
        "version" : "1.22.2"
      }
    },
    {
      "identity" : "loaf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/schmidyy/Loaf",
      "state" : {
        "revision" : "5f78a659666fd1025579ded60960452a4c60eda6",
        "version" : "0.7.0"
      }
    },
    {
      "identity" : "mbprogresshud",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/jdg/MBProgressHUD.git",
      "state" : {
        "revision" : "bca42b801100b2b3a4eda0ba8dd33d858c780b0d",
        "version" : "1.2.0"
      }
    },
    {
      "identity" : "nanopb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/nanopb.git",
      "state" : {
        "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
        "version" : "2.30909.0"
      }
    },
    {
      "identity" : "ohhttpstubs",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/AliSoftware/OHHTTPStubs.git",
      "state" : {
        "revision" : "12f19662426d0434d6c330c6974d53e2eb10ecd9",
        "version" : "9.1.0"
      }
    },
    {
      "identity" : "promises",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/promises.git",
      "state" : {
        "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
        "version" : "2.3.1"
      }
    },
    {
      "identity" : "reachability.swift",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/ashleymills/Reachability.swift",
      "state" : {
        "revision" : "c01bbdf2d633cf049ae1ed1a68a2020a8bda32e2",
        "version" : "5.1.0"
      }
    },
    {
      "identity" : "rxalamofire",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/RxSwiftCommunity/RxAlamofire",
      "state" : {
        "revision" : "9535b58695b91fb67f56d58d6fd0c76462d7743a",
        "version" : "6.1.2"
      }
    },
    {
      "identity" : "rxgesture",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/RxSwiftCommunity/RxGesture",
      "state" : {
        "revision" : "1b137c576b4aaaab949235752278956697c9e4a0",
        "version" : "4.0.4"
      }
    },
    {
      "identity" : "rxswift",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/ReactiveX/RxSwift",
      "state" : {
        "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4",
        "version" : "6.6.0"
      }
    },
    {
      "identity" : "snapkit",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/SnapKit/SnapKit",
      "state" : {
        "revision" : "f222cbdf325885926566172f6f5f06af95473158",
        "version" : "5.6.0"
      }
    },
    {
      "identity" : "swift-protobuf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apple/swift-protobuf.git",
      "state" : {
        "revision" : "cf62cdaea48b77f1a631e5cb3aeda6047c2cba1d",
        "version" : "1.23.0"
      }
    },
    {
      "identity" : "viewanimator",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/marcosgriselli/ViewAnimator",
      "state" : {
        "revision" : "55f1c46241b181c3e0b68d70edb6d87926c7d183",
        "version" : "3.1.0"
      }
    },
    {
      "identity" : "xcglogger",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/DaveWoodCom/XCGLogger",
      "state" : {
        "revision" : "a9c4667b247928a29bdd41be2ec2c8d304215a54",
        "version" : "7.0.1"
      }
    }
  ],
  "version" : 2
}

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 6 months ago

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

rizafran commented 6 months ago

Hi @shamiul110107, it looks like your issue is related to #11732. Does updating the SDK to 10.13.0 or later fixes the issue?

shamiul110107 commented 6 months ago

Hi, @rizafran actually this crash happening only in production. I will update the SDK and monitor crashlytics.

shamiul110107 commented 6 months ago

Hi, @rizafran Still showing crash in crashlytics. SDK Version 10.21.0

Screenshot 2024-02-26 at 08 23 42
shamiul110107 commented 6 months ago

Hi @rizafran Any Update?

rizafran commented 6 months ago

Sorry for the late revert, could you provide your full stack trace of the issue? Based on the stack trace you shared initially, it seems like there are missing UUIDs and the crashes aren't symbolicated.

shamiul110107 commented 6 months ago

@rizafran here is the file for stack trace stack-trace.txt

paulb777 commented 6 months ago

The stacktrace shows the crash from InsiderGeofence. The problem may be purely an InsiderGeofence issue or may be an interaction problem between it and Firebase Performance.

shamiul110107 commented 6 months ago

@paulb777, I removed the Performance SDK temporarily from my last release. Now this crash is not happening. So, how can I know that this crash is from InsiderGeofence?

paulb777 commented 6 months ago

Does removing InsiderGeofence instead of FirebasePerformance also eliminate the crash?

shamiul110107 commented 6 months ago

@paulb777, Didn't removed the InsiderGeofence yet. Actually we can't delete it because it's actively used in the app

morganchen12 commented 6 months ago

It's likely that one of InsiderGeofence or InsiderMobile is not compatible with Performance. You may not be able to use all three of these frameworks together in your app.