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

Firebase SDK crashes on FBLPromise with unrecognized selector and [FirebaseAnalytics][I-ACS800014] Cannot get flag for unregistered flag. SDK name, flag name: app_measurement, session_stitching_token_feature_enabled.

Open besujju opened this issue 3 years ago • 2 comments

Description

Expected - App should launch successfully with firebase dependencies. Actually happened - App is crashing with [FirebaseAnalytics][I-ACS800014] Cannot get flag for unregistered flag. SDK name, flag name: app_measurement, session_stitching_token_feature_enabled and FBLPromise with unrecognized selector errors.

Reproducing the issue

  1. install FirebaseCore 9.6.0
  2. install FirebaseMessaging 9.6.0
  3. install 'MLKitCommon', '6.0.0'
  4. install 'GoogleMLKit', '3.0.0'

MLKitCommon, a GoogleMLKit dependency, depends on GoogleDataTransport which Firebase also depends upon. Make this type of dependency in the code and run it. The app will crash while launching the app.

Device Logs

Last Exception Backtrace: 0 CoreFoundation 0x1cb266248 __exceptionPreprocess + 164 1 libobjc.A.dylib 0x1c4633a68 objc_exception_throw + 60 2 CoreFoundation 0x1cb3da3f0 +[NSObject(NSObject) _copyDescription] + 0 3 CoreFoundation 0x1cb27c360 forwarding + 1592 4 CoreFoundation 0x1cb2e4660 _CF_forwarding_prep_0 + 96 5 GoogleDataTransport 0x10090e5b0 -[GDTCCTUploadOperation updateNextUploadTimeWithResponse:forTarget:] + 80 6 GoogleDataTransport 0x10090dce8 __64-[GDTCCTUploadOperation sendURLRequestWithBatch:target:storage:]_block_invoke + 92 7 FBLPromises 0x10052d418 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.48 + 84 8 FBLPromises 0x10052ceb8 __44-[FBLPromise observeOnQueue:fulfill:reject:]_block_invoke_2 + 128 9 libdispatch.dylib 0x10690c598 _dispatch_call_block_and_release + 32 10 libdispatch.dylib 0x10690e04c _dispatch_client_callout + 20 11 libdispatch.dylib 0x1069162b8 _dispatch_lane_serial_drain + 1432 12 libdispatch.dylib 0x106916e24 _dispatch_lane_invoke + 420 13 libdispatch.dylib 0x106923cac _dispatch_workloop_worker_thread + 740 14 libsystem_pthread.dylib 0x217b84df8 _pthread_wqthread + 288 15 libsystem_pthread.dylib 0x217b84b98 start_wqthread + 8

Logs from console

2022-09-20 11:09:52.773283+0530 - [FirebaseAnalytics][I-ACS800014] Cannot get flag for unregistered flag. SDK name, flag name: app_measurement, session_stitching_token_feature_enabled 2022-09-20 11:09:53.438277+0530 ] [Common] Snapshot request 0x2835ad530 complete with error: <NSError: 0x2835dedf0; domain: BSActionErrorDomain; code: 6 (anulled)> 2022-09-20 11:09:54.088426+0530 -[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x2835fb000 2022-09-20 11:09:54.090257+0530 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x2835fb000' *** First throw call stack: (0x1cb266248 0x1c4633a68 0x1cb3da3f0 0x1cb27c360 0x1cb2e4660 0x10090e5b0 0x10090dce8 0x10052d418 0x10052ceb8 0x10690c598 0x10690e04c 0x1069162b8 0x106916e24 0x106923cac 0x217b84df8 0x217b84b98) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x2835fb000' terminating with uncaught exception of type NSException

Firebase SDK Version

9.6.0

Xcode Version

13.3.1

Installation Method

CocoaPods

Firebase Product(s)

Crashlytics, Messaging

Targeted Platforms

iOS

Relevant Log Output

No response

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!

besujju avatar Sep 20 '22 08:09 besujju

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 Sep 20 '22 08:09 google-oss-bot

Please share the Podfile.lock. With an older version of FirebaseAnalytics, the -ObjC option may need to be added to the Other Linker Flags Build Setting.

paulb777 avatar Sep 20 '22 14:09 paulb777

Hey @besujju. 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 Sep 27 '22 01:09 google-oss-bot

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

@besujju 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 Oct 04 '22 01:10 google-oss-bot

I'm getting this exact warning in the Console with Firebase 10.1.0. We don't use App Measurement at all so the issue must come from inside one of the frameworks. I highly doubt this is a developer-initiated request, seems more like an internal flag being fetched by the SDK alone.

username0x0a avatar Oct 30 '22 19:10 username0x0a

@username0x0a Please create another issue with the template filled out and reproduction instructions.

paulb777 avatar Oct 31 '22 15:10 paulb777