On some Android devices, when Firebase.instance.getToken appears, this exception appear. although api key support all firebase installation services.
Future<String> getDeviceToken() async {
try {
String? token;
token = await _firebaseMessaging.getToken() ?? '';
return Future.value(token);
} catch (e) {
return Future.value("");
}
}