flutter-sdk
flutter-sdk copied to clipboard
Getting "A data connection is not currently allowed" error on iOS
hello
i am getting this error
QonversionInternal.checkEntitlements [FlutterError - PlatformException(-1020, A data connection is not currently allowed., Qonversion Error Code: -1020, null). Error thrown null.]
from my error understanding is that because there is no connection but in qonversion offline sdk documentation it said that it will return the last user entitlements cache
Hello! Could you please provide us with a steps to reproduce your issue? Also please write which SDK version do you use.
If you could provide us with a minimal reproducible example - it would be even perfect.
I am using qonversion sdk 5.3.1
here is a snippet from you code
final Map<String, QEntitlement> entitlements = await Qonversion.getSharedInstance().checkEntitlements();
isSubscribed = PurchasesUtils().checkUserSubscribed(entitlements);
and this is the CheckUserSubscribed function
bool checkUserSubscribed(Map<String, QEntitlement> entitlements) { final premium = entitlements['premium']; if (premium != null && premium.isActive) { return true; } else { return false; } }
Do you face this problem on every call?
Also, as far as I understood, you try to fetch entitlements without the internet connection?
No,
i am not facing this error, but this error is in my Firebase Analytics happens to some of my users
Could you please clarify is it a platform specific issue or does it occur on both Android and iOS?
ios

Thank you for the provided information! We will check this issue and write back as soon as we have any information.
Same issue here. iPhone 11 Pro - iOS 16.4.1
Crashed in non-app: message_codecs.dart in StandardMethodCodec.decodeEnvelope within flutter
qonversion_internal.dart in QonversionInternal.checkEntitlements at line 163 within qonversion_flutter
PlatformException: PlatformException(-1020, A data connection is not currently allowed., Qonversion Error Code: -1020, null)
Could you please share any details and steps to reproduce that you have?
I've tried to reproduce the crash multiple times playing with the internet connection, but all my attempts were unsuccessful.
This issue was closed because it has been stalled for 5 days with no activity.