flutter-sdk icon indicating copy to clipboard operation
flutter-sdk copied to clipboard

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

Open sparkmobi opened this issue 2 years ago • 9 comments

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

sparkmobi avatar Apr 03 '23 12:04 sparkmobi

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.

SpertsyanKM avatar Apr 03 '23 13:04 SpertsyanKM

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

sparkmobi avatar Apr 03 '23 16:04 sparkmobi

Do you face this problem on every call?

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

SpertsyanKM avatar Apr 03 '23 16:04 SpertsyanKM

No,

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

sparkmobi avatar Apr 03 '23 18:04 sparkmobi

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

SpertsyanKM avatar Apr 04 '23 07:04 SpertsyanKM

ios

sparkmobi avatar Apr 05 '23 04:04 sparkmobi

image

sparkmobi avatar Apr 05 '23 04:04 sparkmobi

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

SpertsyanKM avatar Apr 05 '23 07:04 SpertsyanKM

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)

MathieuAlphamosa avatar May 08 '23 17:05 MathieuAlphamosa

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.

SpertsyanKM avatar Aug 14 '24 12:08 SpertsyanKM

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 01 '24 02:09 github-actions[bot]