Skip to content

Firebase SDK crashes app on in-app purchase completion with: [__NSCFBoolean timeIntervalSince1970]: unrecognized selector sent to instance #4176

@ansonl

Description

@ansonl

[READ] Step 1: Are you in the right place?

Yes

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11.0
  • Firebase SDK version: 6.11.0
  • Firebase Component: Core/Unknown
  • Component version: 6.11.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Import frameworks for Firebase Analytics into project. (I am not sure which framework exactly is causing the crash.)

Complete an in app purchase in an iOS app with the transaction status of Purchased or Restored.
After the iOS callbacks for transaction finished have completed, the application will crash with the below debug text:

2019-10-27 15:49:05.517220-0400 Viewer[1750:856110] -[__NSCFBoolean timeIntervalSince1970]: unrecognized selector sent to instance 0x1eba82ff8
2019-10-27 15:49:05.518940-0400 Viewer[1750:856110] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean timeIntervalSince1970]: unrecognized selector sent to instance 0x1eba82ff8'
*** First throw call stack:
(0x1bb9a6190 0x1bab7b9f8 0x1bb8c29cc 0x1bb9ab9d8 0x1bb9ad66c 0x100d4b4f4 0x100d4cdb4 0x100d4d42c 0x100f636f4 0x100f64c78 0x100f67ad4 0x100f75dc8 0x100f767ac 0x1bb5c21b4 0x1bb5c4cd4)
libc++abi.dylib: terminating with uncaught exception of type NSException

This behavior occurs 100% of the time.

Relevant Code:

Initiate FIRApp in your code.

After creating an SKProduct with an identifier string for the app id in App Store Connect, successfully make a purchase in the sandbox similar to below.

- (void)requestPaymentForProduct:(SKProduct *)product {
  SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product];
  payment.quantity = 1;
  //payment.simulatesAskToBuyInSandbox= YES;
  [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
  [[SKPaymentQueue defaultQueue] addPayment:payment];
}

After the purchase completes or is restored and the Apple "success popup" shows, the application will crash with the mentioned message.

This issue has also been reported at Firebase google support online with Case 00018902

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions