Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_app_purchase 0.3.4+10 new crash from "simulatesAskToBuyInSandbox" #67139

Closed
nezoat opened this issue Oct 2, 2020 · 3 comments
Closed

in_app_purchase 0.3.4+10 new crash from "simulatesAskToBuyInSandbox" #67139

nezoat opened this issue Oct 2, 2020 · 3 comments

Comments

@nezoat
Copy link

nezoat commented Oct 2, 2020

Parameters are not @required and should be, otherwise crash results.

When using the following method, if the 'sandboxTesting' optional parameter is not provided, results in crash:

InAppPurchaseConnection.instance
         .buyNonConsumable(purchaseParam: PurchaseParam(productDetails: <>, applicationUserName: <>, sandboxTesting: <>));

App crashes at line 183, InAppPurchasePlugin.m:
[[paymentMap objectForKey:@"simulatesAskToBuyInSandbox"] boolValue];

Results in error: "[NSNull boolValue]: unrecognized selector sent to instance"

Thread#0	0x0000000193a5a5ac in <redacted> ()
#1	0x00000001a7ad442c in objc_exception_throw ()
#5	0x0000000105c90c8c in -[InAppPurchasePlugin addPayment:result:] at /Users/lee/.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.3.4+10/ios/Classes/InAppPurchasePlugin.m:183
#6	0x0000000105c8f964 in -[InAppPurchasePlugin handleMethodCall:result:] at /Users/lee/.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.3.4+10/ios/Classes/InAppPurchasePlugin.m:91
#7	0x00000001042456cc in __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke ()
#8	0x0000000103a04cd4 in flutter::PlatformViewIOS::HandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>) ()
#9	0x0000000103cdf54c in std::__1::__function::__func<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>)::$_33, std::__1::allocator<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>)::$_33>, void ()>::operator()() ()
#10	0x0000000103a0e27c in fml::MessageLoopImpl::FlushTasks(fml::FlushType) ()
#11	0x0000000103a109a8 in fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) ()
#16	0x00000001939d04bc in CFRunLoopRunSpecific ()
#17	0x00000001aa455820 in GSEventRunModal ()
#18	0x0000000196374734 in <redacted> ()
#19	0x0000000196379e10 in UIApplicationMain ()
#20	0x0000000102158978 in main at /Users/lee/Development/IntelliJProjects/social_chess_flutter/ios/Runner/AppDelegate.swift:7
#21	0x0000000193697e60 in <redacted> ()
@SpajicM
Copy link

SpajicM commented Oct 2, 2020

Duplicate of #65767

@darshankawar
Copy link
Member

@nezoat
Please see above referenced ticket and related open PR to fix the issue.
Closing this as duplicate.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants