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

Getting "A data connection is not currently allowed" error on iOS #224

Open
sparkmobi opened this issue Apr 3, 2023 · 9 comments
Open
Labels
bug Something isn't working in progress

Comments

@sparkmobi
Copy link

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

@SpertsyanKM
Copy link
Contributor

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.

@sparkmobi
Copy link
Author

sparkmobi commented Apr 3, 2023

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;
}
}

@SpertsyanKM
Copy link
Contributor

Do you face this problem on every call?

Also, as far as I understood, you try to fetch entitlements without the internet connection?

@sparkmobi
Copy link
Author

No,

i am not facing this error, but this error is in my Firebase Analytics happens to some of my users

@SpertsyanKM
Copy link
Contributor

Could you please clarify is it a platform specific issue or does it occur on both Android and iOS?

@sparkmobi
Copy link
Author

ios

@sparkmobi
Copy link
Author

image

@SpertsyanKM
Copy link
Contributor

Thank you for the provided information! We will check this issue and write back as soon as we have any information.

@SpertsyanKM SpertsyanKM added bug Something isn't working in progress labels Apr 5, 2023
@MathieuAlphamosa
Copy link

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)

@SpertsyanKM SpertsyanKM changed the title Getting this error Getting "A data connection is not currently allowed" error on iOS Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Development

No branches or pull requests

3 participants