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

Release Mode Issue #85

Closed
fortknox opened this issue Jan 9, 2021 · 9 comments
Closed

Release Mode Issue #85

fortknox opened this issue Jan 9, 2021 · 9 comments

Comments

@fortknox
Copy link

fortknox commented Jan 9, 2021

Good day,
I’m currently having an error testing the implementation of the PayStack Flutter SDK on my mobile app.
It appears to work on the Emulator on Debug Mode but when on a Physical Device on Release Mode, while testing on TestFlight, I get the following error :
NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried Calling: length

TRY ANOTHER CARD
START OVER WITH SAME CARD
Debug Mode

Release Mode

@DEVSOG12
Copy link

How you trying to charge the card

@fortknox
Copy link
Author

How you trying to charge the card

Yes I was.

@DEVSOG12
Copy link

DEVSOG12 commented Jan 12, 2021 via email

@fortknox
Copy link
Author

Are you using the server implementation or the local implementation

Not sure, can you please expatiate....

@DEVSOG12
Copy link

For firstly the error you got may be due to the fact a variable was unassigned or is null. For me my implementation of the plug-in on iOS works fine, doesn't seem to have any issue on both the emulator the physical device. A really doubt that it could go wrong on test flight. I would have checked it out but my membership expired and I'm yet to pay this year.

Where exactly did you get this error!

@fortknox
Copy link
Author

For firstly the error you got may be due to the fact a variable was unassigned or is null. For me my implementation of the plug-in on iOS works fine, doesn't seem to have any issue on both the emulator the physical device. A really doubt that it could go wrong on test flight. I would have checked it out but my membership expired and I'm yet to pay this year.

Where exactly did you get this error!

The variable is assigned as it works well on the emulator from cradle to grave i.e payment successful and feedback token received etc.
while deployed on the physical device, the error pops up after entering the card details.... probably something breaks up during compilation. I will want you to shed more light on the server/local implementation.

@DEVSOG12
Copy link

You could check This Repo For An Example. For the Local Implementation, you don't need to make calls the backend and the logic of the transaction is handled on the frontend. For the server implementation there can help a http post to your backend sending {email, name, meta_data , reference}, then your backend will send back an. access code, this code will now enable the transaction to be processed. The the transaction can also be verified with the reference passed.
I think the backend implementation works better, if you are building a full stack app. But If you going server less then the UI Implementation should be okay :).

Have you tried running flutter run --release -d <device_id> other than using TestFlight. And also the OTP pin entered dust be 6 characters entering more than this may throw an error

@DEVSOG12
Copy link

My Implementation on both iOS and Android Works fine in release!

@fortknox
Copy link
Author

My Implementation on both iOS and Android Works fine in release!

Thanks a lot. I finally found the problem, the variable was referencing a wrong key. It’s working now. Thanks a lot for all the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants