-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error: You need to be activate Adapty once #124
Comments
It also happens for when running on iOS: once I added the API key to |
Having same issue |
After updating to version 3+, I started experiencing the same issue. |
@x401om , @vladd-g we're experiencing the same issue on Android. When we first install, it is working normally. But when you perform hot restart, adapty prints this error. E/Adapty_v3.1.0(29444): ERROR: Adapty was already activated. If you want to provide new customerUserId, please call 'identify' function instead. We tried to check with isActivated but no luck. I think in native side, it continue to keep last activation even if hot restart happens. |
Having the same issue too |
I have checked that isActivated method and it calls this function on native side. Still, it returns incorrect answer. |
Hi everyone! Thank you for your patience. We’ve just released version 3.2.3, which ensures that Please make sure to use I assume you’ll implement the activation flow something like this: import 'package:adapty_flutter/adapty_flutter.dart';
import 'package:flutter/foundation.dart';
Future<void> activateAdaptyIfNeeded() async {
try {
var isActivated = false;
// Please consider not using this in production to avoid any unwanted effects
if (kDebugMode) {
isActivated = await Adapty().isActivated();
} else {
isActivated = false;
}
if (!isActivated) {
await Adapty().activate(configuration: <YOUR_CONFIGURATION_OBJECT>);
await AdaptyUI().activate(observer: <YOUR_OBSERVER_OBJECT>);
} else {
Adapty().setupAfterHotRestart();
AdaptyUI().setupAfterHotRestart(observer: this);
}
} catch (e) {
// handle the error
}
} |
The method 'setupAfterHotRestart' isn't defined for the type 'AdaptyUI'. adapty_flutter: ^3.3.0 |
Even though I check the status with
Adapty().isActivated()
before activation,Adapty().activate(...)
returns error 3005.The
Adapty().isActivated()
method returns false.It seems like it’s not working correctly.
Error:
(code: 3005, message: You need to be activate Adapty once, detail: {"detail":"AdaptyError.activateOnceError([3.2.0]: Adapty\/Adapty+Activate.swift#65)","adapty_code":3005,"message":"You need to be activate Adapty once"})
The text was updated successfully, but these errors were encountered: