-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
stripeSdk has not been initialized on Android #68
Comments
When stripeSdk.initialise() is invoked, stripeSdk property has not yet initialized.
44 when (call.method) {
45 "initialise" -> {
46 stripeSdk.initialise(
47 params = ReadableMap(call.arguments as JSONObject),
48 promise = Promise(result),
49 )
50 } And this is strange because the initialization is made here:
107 override fun onAttachedToActivity(binding: ActivityPluginBinding) {
108 stripeSdk = StripeSdkModule(ReactApplicationContext(binding), stripeSdkCardViewManager)
109 } Is possibile that onAttachedToActivity is never triggered? |
Is your main activity based on FlutterFragmentActivity or FlutterActivity? |
Sorry for my question, maybe I am not prepared for this. I'm using your plugin in a flutter application. Thank you for your support, and sorry, I am trying to learn :) |
Noo need to worry! Thank you for creating this issue, you have been very helpful so far. By default, Flutter apps use I think FlutterFragmentActivity is needed for the Stripe SDK to work, @jonasbark can you confirm this?. If this is the case we should add this to the docs. The change should be quite easy, change |
Ah ok! Thanks for this tip. |
Now it's working well. Thank you guys! |
Hi, I have the same error, but changing my MainActivity.kt I receive errors from Firebase plugin! Have you suggestion to solve this? There is another fix ? Thanks |
Could you specify the error you are getting with the Firebase plugin? |
It's work now, I cleaned the project! |
I will close this issue now that is detailed inside the readme |
I'll implement a runtime check so it's easier to read configuration issues |
Hi guys, I'm back here writing again. kotlin.UninitializedPropertyAccessException: lateinit property stripe has not been initialized
This left me surprised as I am not using Stripe in this segment. Seeing the message error, I actually tried using stripe before I could make a payment with the mypos API, and it went like this... Activity com.anmentone.app.MainActivity has leaked IntentReceiver
Device infomyPOS Smart N5
I emphasize that Stripe has nothing to do with these payments. I use it elsewhere to be able to renew the subscription which allows you to use premium features. I'm trying to go deeper but I can't understand the problem. If you have any ideas I would be very grateful. |
This already provides plenty of information, thank you! We will have a look. |
* fix android leaks, activity result propagation fixes #68 * fix activity usage
I followed the example in order to do payments with webook and I believe I have not missed anything.
When I call confirmPaymentMethod:
I get this error:
Log error
The thing is that the example works, my app doesn't.
I've call also in my main.dart before runApp and public key already configured:
flutter doctor -v
Thanks for your help!
The text was updated successfully, but these errors were encountered: