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

FlutterInappPurchase.buyProduct errors #2

Closed
alamboley opened this issue Aug 6, 2018 · 7 comments
Closed

FlutterInappPurchase.buyProduct errors #2

alamboley opened this issue Aug 6, 2018 · 7 comments
Labels
bug Something isn't working

Comments

@alamboley
Copy link
Contributor

alamboley commented Aug 6, 2018

Hello,

Many thanks for this awesome plugin!

At the moment, I'm testing your plugin. I got an issue on this line var bought = await FlutterInappPurchase.buyProduct(product.productId);:

On Android:

W/BillingHelper(24166): Couldn't find purchase lists, trying to find single data.
D/FlutterInappPurchasePlugin(24166): Purchase Updated Listener
D/FlutterInappPurchasePlugin(24166): responseCode: 0
E/flutter (24166): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (24166): type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'FutureOr<IAPItem>'
E/flutter (24166): #0      FlutterInappPurchase.buyProduct (package:flutter_inapp_purchase/flutter_inapp_purchase.dart:186:14)
E/flutter (24166): <asynchronous suspension>
E/flutter (24166): #1      _MoneyShop._buyProduct (package:insta_boost/views/money_shop.dart:30:45)
E/flutter (24166): <asynchronous suspension>
E/flutter (24166): #2      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter (24166): #3      TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
E/flutter (24166): #4      TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
E/flutter (24166): #5      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (24166): #6      _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
E/flutter (24166): #7      _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
E/flutter (24166): #8      _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
E/flutter (24166): #9      _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
E/flutter (24166): #10     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
E/flutter (24166): #11     _invoke1 (dart:ui/hooks.dart:134:13)
E/flutter (24166): #12     _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)

On iOS:

[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'String'
#0      FlutterInappPurchase.buyProduct (package:flutter_inapp_purchase/flutter_inapp_purchase.dart:195:28)
<asynchronous suspension>
#1      _MoneyShop._buyProduct (package:insta_boost/views/money_shop.dart:30:45)
<asynchronous suspension>
#2      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
#3      TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
#4      TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
#5      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#6      _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
#7      _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
#8      _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
#9      _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
#10     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
#11     _invoke1 (dart:ui/hooks.dart:134:13)
#12     _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
@alamboley alamboley changed the title FlutterInappPurchase.buyProduct Android error FlutterInappPurchase.buyProduct errors Aug 6, 2018
@hyochan
Copy link
Owner

hyochan commented Aug 6, 2018

@alamboley Thanks for the bug report. I cound't test from the actual purchase yet because I had some troubles with authenticating with my device. I'll look for this one this week!

@hyochan hyochan added the bug Something isn't working label Aug 6, 2018
@hyochan
Copy link
Owner

hyochan commented Aug 6, 2018

@alamboley I've updated this quickly in version 0.2.3. You may try that one. Also, this still needs much more improvement currently. Maybe, it will take around 3 weeks to make this library stable to be released as version 1.

@alamboley
Copy link
Contributor Author

Thanks @dooboolab it's fixed! In the meantime, I tried getPurchaseHistory same problem. We can make all those return type as dynamic value, but in the long term we should have typed return.
I think the issue comes from unknow json key.

I will make more tests this afternoon, thanks!

@hyochan
Copy link
Owner

hyochan commented Aug 6, 2018

@alamboley Thanks. I do think exactly as you do. Need more type enhancement. I will keep working on this until it gets quite stable. I've just released this quickly to get some contributors :)

@alamboley
Copy link
Contributor Author

First PR ;) Congrats again for your hard work.

@hyochan
Copy link
Owner

hyochan commented Aug 7, 2018

@alamboley Close this for now. Thank you for the PR.

@alamboley
Copy link
Contributor Author

Just noticed the 0.3.1 version, thanks sir :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants