ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

Trying to implement login (stripe-sdk example)/ but getting Ticker error #72

Closed reallycannotsay closed 3 years ago

reallycannotsay commented 4 years ago

Hi, I am using the stripe SDK example and was trying to implement login, the customer screen shows the correct information and, I am able to navigate, but when I try to add the card I get the error mentioned below, I am kinda new to flutter. The app works completely fine if i have no login that's how i was able to add cards in the first place

[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: This ticker was canceled: Ticker(created by _CreditCardState#d3d32(lifecycle state: created))

And even though the card is created in the stripe, the app keeps loading indefinitely.

If anyone is willing to help me understand how I should navigate to the example page, I have a button on the app bar that simply says Navigator.of(context).pushNamed('/paymentmethod'); NOTE: make a route that goes to the payment page (the picture down below) image

if i try to delete a card i get the error below, the dispose(), i am not a pro, but can it be a error in the sdk

E/flutter ( 7918): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. E/flutter ( 7918): At this point the state of the widget's element tree is no longer stable. E/flutter ( 7918): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.

When i go to the edit customer screen i am able to see the login email, which means that the auth is working

image

eyoeldefare commented 4 years ago

I am a bit confused

Hi, I am using the stripe SDK example and was trying to implement login, the customer screen shows the correct information and, I am able to navigate, but when I try to add the card I get the error mentioned below, I am kinda new to flutter. The app works completely fine if i have no login that's how i was able to add cards in the first place

[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: This ticker was canceled: Ticker(created by _CreditCardState#d3d32(lifecycle state: created))

And even though the card is created in the stripe, the app keeps loading indefinitely.

If anyone is willing to help me understand how I should navigate to the example page, I have a button on the app bar that simply says Navigator.of(context).pushNamed('/paymentmethod'); NOTE: make a route that goes to the payment page (the picture down below) image

if i try to delete a card i get the error below, the dispose(), i am not a pro, but can it be a error in the sdk

E/flutter ( 7918): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. E/flutter ( 7918): At this point the state of the widget's element tree is no longer stable. E/flutter ( 7918): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.

When i go to the edit customer screen i am able to see the login email, which means that the auth is working

image

I am a bit confused. What do you mean by "trying to implement login"? Can you please post the whole exceptions you're getting and just post it here. If things are loading indefinitely, that certainly means the API is not working correctly but I don't see any Network related exceptions here. I don't think this is an issue with the SDK as there are no other people experience your issue, so its most likely you have done something there.