-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
My app crash immediately when InAppPurchaseConnection.instace.buyNonConsumable() method called.
It was fine when using flutter 1.17.x and in_app_purchase 0.3.4
Steps to Reproduce
Here is my pubspec.yaml dependencies
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
flutter_sticky_header: ^0.5.0
video_player: '>=0.10.12+2 <2.0.0'
screen: ^0.0.5
device_info: '>=0.4.2+7 <2.0.0'
http: ^0.12.2
shared_preferences: '>=0.5.10 <2.0.0'
connectivity: '>=0.4.9+2 <2.0.0'
shimmer: ^1.1.1
rxdart: ^0.24.1
transparent_image: ^1.0.0
share: '>=0.6.5 <2.0.0'
url_launcher: ^5.5.2
flutter_launcher_icons: ^0.7.5
uni_links: ^0.4.0
flutter_svg: ^0.18.1
package_info: '>=0.4.3 <2.0.0'
intl: ^0.16.1
cloud_firestore: ^0.14.0+2
firebase_analytics: ^6.0.0
cached_network_image: ^2.3.1
in_app_purchase: ^0.3.4+8
flutter_html: ^1.0.2
flutter_keychain:
git:
url: git://github.com/jeroentrappers/flutter_keychain
dev_dependencies:
flutter_test:
sdk: flutter
json_serializable: ^3.4.1
build_runner: ^1.10.0
json_annotation: ^3.0.1
Expected results: Payment confirmation pop up
Actual results: App crash
Flutter run --verbose ( latest logs on crash )
[ +3 ms] Flutter run key commands.
[ +8 ms] r Hot reload. 🔥🔥🔥
[ +48 ms] R Hot restart.
[ +3 ms] h Repeat this help message.
[ +5 ms] d Detach (terminate "flutter run" but leave application running).
[ +24 ms] c Clear the screen
[ +1 ms] q Quit (terminate the application on the device).
[ ] An Observatory debugger and profiler on Parwanto’s iPad is available at: http://localhost:55119
[+30377 ms] Service protocol connection closed.
[ ] Lost connection to device.
[ +6 ms] DevFS: Deleting filesystem on the device
(file:///private/var/mobile/Containers/Data/Application/76F315E0-273C-44FD-8CFC-982F198BF2DA/tmp/stro-tv-appsXcDnpk/stro-tv-apps/)
[ +254 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[ +3 ms] "flutter run" took 175,136ms.
[ +125 ms] ensureAnalyticsSent: 119ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +2 ms] Shutdown hooks complete
[ ] exiting with code 0
Logs from debugging on xcode
2020-09-15 12:58:27.431217+0700 Runner[521:106414] -[NSNull boolValue]: unrecognized selector sent to instance 0x1ef5a7c00
2020-09-15 12:58:27.435407+0700 Runner[521:106414] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull boolValue]: unrecognized selector sent to instance 0x1ef5a7c00'
*** First throw call stack:
(0x1b38c8a48 0x1b35effa4 0x1b37cc5a8 0x1b38ccaf4 0x1b38cea7c 0x10108a7bc 0x101089278 0x1048c2e88 0x1040bb584 0x104384994 0x1040c4734 0x1040c6b64 0x1b384703c 0x1b3846d78 0x1b3846448 0x1b3841584 0x1b3840adc 0x1bd7c6328 0x1b793bae0 0x100601ef8 0x1b36ca360)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
UPDATED
Error on this line of code :
if (@available(iOS 8.3, *)) {
payment.simulatesAskToBuyInSandbox =
[[paymentMap objectForKey:@"simulatesAskToBuyInSandbox"] boolValue];
}
Flutter doctor -v
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale en-ID)
• Flutter version 1.20.3 at /Users/anggagumilar/flutter
• Framework revision 216dee6 (13 days ago), 2020-09-01 12:24:47 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/anggagumilar/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.7, Build version 11E801a
• CocoaPods version 1.9.3
[!] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.48.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (1 available)
• Parwanto’s iPad (mobile) • 9205677791ca656e51e7c0d70902f383b47b42d9 • ios • iOS 13.3