Terminating app due to uncaught exception NSInvalidArgumentException

Describe the issue

Terminating app due to uncaught exception ‘NSInvalidArgumentException’.

when I hit the Apple Pay Button I got this issue.

787406+0530 Runner[6770:338808] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument’
*** First throw call stack:
(0x1a718edb4 0x1a56199a0 0x1a653e4bc 0x1a653e380 0x104c1cda0 0x104c13f38 0x104c1e860 0x108ca0b14 0x10878ba8c 0x10511408c 0x1051158c4 0x105124428 0x105124080 0x1a7218ac8 0x1a71fc754 0x1a7200dfc 0x1e10b6984 0x1ae3e3e7c 0x1ae3e3af4 0x102da4d34 0x1c88bede0)

Steps to reproduce the issue.

Added latest version of SDK.

  1. flutter pubspec.yaml : square_in_app_payments: ^1.7.5
  2. initialize Apple Pay
  3. call `await InAppPayments.requestApplePayNonce(…)

Here the piece of code that reproduce the issue.

   InAppPayments.requestApplePayNonce(
      price: "1.0",
      currencyCode: "USD",
      countryCode: 'US',
      summaryLabel: 'Cookie',
      paymentType: ApplePayPaymentType.finalPayment,
      onApplePayComplete: _onApplePayEntryComplete,
      onApplePayNonceRequestSuccess: _onApplePayNonceRequestSuccess,
      onApplePayNonceRequestFailure: _onApplePayNonceRequestFailure,
    );

already posted same on stack overflow : flutter - Square Apple Pay Integration: Terminating app due to uncaught exception 'NSInvalidArgumentException' - Stack Overflow
My app get crashed, I’m running in iPhoneX with iOS 16. please provide the solution as soon as possible.

Was this working in a previous version? Also what’s your application ID? :slightly_smiling_face:

I’m unaware of older versions, I’ve only integrated the most recent flutter version from square_in_app_payments | Flutter Package → square_in_app_payments: 1.75
and my application id sandbox-sq0idb-WKSl9n9IH8D0Ffs9gRcEoA