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

Flutter Activate issue #140

Open
khaledshebltoptal opened this issue Dec 28, 2024 · 5 comments
Open

Flutter Activate issue #140

khaledshebltoptal opened this issue Dec 28, 2024 · 5 comments

Comments

@khaledshebltoptal
Copy link

khaledshebltoptal commented Dec 28, 2024

await Adapty().activate(
configuration: AdaptyConfiguration(apiKey: 'Key--'),
);

I'm getting an error with the following


DartError: RangeError: max must be in range 0 < max ≤ 2^32, was 0
dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 296:3 throw
dart-sdk/lib/_internal/js_dev_runtime/patch/math_patch.dart 88:7 nextInt
packages/adapty_flutter/src/adapty_logger.dart 19:28 get stamp
packages/adapty_flutter/src/adapty.dart 410:32 _invokeMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
packages/adapty_flutter/src/adapty.dart 405:29 [_invokeMethod]
packages/adapty_flutter/src/adapty.dart 73:11 activate


Using:
adapty_flutter: ^3.2.3

Flutter 3.24.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cf269e36d (4 months ago) • 2024-09-03 14:30:00 -0700
Engine • revision a6bd3f1de1
Tools • Dart 3.5.2 • DevTools 2.37.2

please help?

@khaledshebltoptal khaledshebltoptal changed the title Flutter Activate Flutter Activate For web support Dec 28, 2024
@khaledshebltoptal khaledshebltoptal changed the title Flutter Activate For web support Flutter Activate issue Dec 28, 2024
@PBomermustekiin
Copy link

check 3.3.0 version they updated this part.

@khaledshebltoptal
Copy link
Author

Right now, I'm using
adapty_flutter: ^3.3.0
and also having the same issue
Error fetching paywalls: RangeError: max must be in range 0 < max ≤ 2^32, was 0

What I did
at main() I added the following

await Adapty().activate(
  configuration: AdaptyConfiguration(apiKey: 'Key')
);

Then tried to fetch the paywall by using the following:

try {
final result = await Adapty().getPaywall(placementId: 'placementId'); // Fetch all paywalls
setState(() {
freePaywall = result;
});
} catch (error) {
print('Error fetching paywalls: $error');
return null;
}

But facing the same issue when activating the adapty

Please help and support?

@x401om
Copy link
Collaborator

x401om commented Jan 14, 2025

@khaledshebltoptal please share verbose logs along with the error you are encountering. If you believe the logs may contain sensitive information, feel free to reach out to [email protected].

@khaledshebltoptal
Copy link
Author

khaledshebltoptal commented Jan 15, 2025

HYG
DartError: RangeError: max must be in range 0 < max ≤ 2^32, was 0
dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:3 throw
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 110:39 nextInt
packages/adapty_flutter/src/adapty_logger.dart 19:28 get stamp
packages/adapty_flutter/src/adapty.dart 421:32
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3 _asyncStartSync
packages/adapty_flutter/src/adapty.dart 416:13 [_invokeMethod]
packages/adapty_flutter/src/adapty.dart 71:11
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3 _asyncStartSync
packages/adapty_flutter/src/adapty.dart 66:16 activate
packages/app/main.dart 81:22
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3 _asyncStartSync
packages/app/main.dart 66:14 main$
web_entrypoint.dart 24:31
lib/ui_web/ui_web/initialization.dart 41:15
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 581:31
dart-sdk/lib/async/zone.dart 1676:54 runUnary
dart-sdk/lib/async/future_impl.dart 204:18 handleValue
dart-sdk/lib/async/future_impl.dart 902:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 931:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 707:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 777:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 186:7

@x401om
Copy link
Collaborator

x401om commented Jan 16, 2025

@khaledshebltoptal this is not a verbose log. Please call Adapty().setLogLevel(AdaptyLogLevel.verbose); before initializing Adapty SDK and copy all the console logs from the application start to the error you are getting. If you feel the logs contain some sensitive data, please send them to [email protected] mentioning this issue.

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

3 participants