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

Object.noSuchMethod getOfferings #17

Closed
tecbot opened this issue Dec 21, 2019 · 2 comments · Fixed by #18
Closed

Object.noSuchMethod getOfferings #17

tecbot opened this issue Dec 21, 2019 · 2 comments · Fixed by #18

Comments

@tecbot
Copy link
Contributor

tecbot commented Dec 21, 2019

Hey,

if there are no offerings available the current parsing of getOfferings will throw an exception.
We found also that this can happen in production, why we are not sure, possible network issue? If a network error could lead to this as well then this is a second issue because I expect that the native plugin throws a PlatformException with NetworkError code.

Non-fatal Exception: dart:core-patch/object_patch.dart 53 in Object.noSuchMethod
0  ???                            0x0 Object.noSuchMethod + 53 (object_patch.dart:53)
1  ???                            0x0 new Offering.fromJson + 37 (offering_wrapper.dart:37)
2  ???                            0x0 new Offerings.fromJson + 13 (offerings_wrapper.dart:13)
3  ???                            0x0 Purchases.getOfferings + 108 (purchases_flutter.dart:108)

We use version: 1.0.1 of the plugin and Flutter (Channel beta, v1.12.13+hotfix.6)

@vegaro
Copy link
Contributor

vegaro commented Dec 21, 2019

Thanks for reporting this. I just released https://github.com/RevenueCat/purchases-flutter/releases/tag/1.0.3 which should address this issue.

I wasn't able to reproduce it when not having connectivity, and it still reported a PlatformException with a NetworkError but hopefully you stop seeing it in production too, not sure how it could happen though...

@tecbot
Copy link
Contributor Author

tecbot commented Dec 24, 2019

@vegaro thx for the quick fix. We had added in production a retry mechanism if we get empty offerings, unfortunately without luck. We get also after 10 attempts with backoff empty offerings. It doesn't happen often comparing to our user base but the root cause would be good to figure out. Network connection is working on the device. What could lead to this behavior?

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

Successfully merging a pull request may close this issue.

2 participants