I'm trying to access my Cloud Firestore data when pushing a button, but this message appears :
W/DynamiteModule(13798): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(13798): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(13798): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/s.magic_button(13798): The ClassLoaderContext is a special shared library.
I/s.magic_button(13798): The ClassLoaderContext is a special shared library.
D/ConnectivityManager(13798): requestNetwork; CallingUid : 10372, CallingPid : 13798
I/s.magic_button(13798): The ClassLoaderContext is a special shared library.
I/DynamiteModule(13798): Considering local module com.google.android.gms.providerinstaller.dynamite:1 and remote module com.google.android.gms.providerinstaller.dynamite:0
I/DynamiteModule(13798): Selected local version of com.google.android.gms.providerinstaller.dynamite
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/s.magic_button(13798): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
And a lot of accessing hidden methods below ^^
Here is my widget :
GoogleAuthButton(onPressed: () async {
await auth.signInWithGoogle().then((user) async {
await auth.getUserData(user.uid).then((data) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
HomePage(user: user, userData: data)));
});
});
})
GoogleAuthButton is one of my custom widgets. The error occurs when I call the "auth.getUserData(user.uid)" method. Here is the code :
Future<MagicUser> getUserData(String uid) {
_store.collection('users').doc(uid).get().then((value) {
MagicUser userData = MagicUser.fromJson(value.data());
return userData;
});
}
When my debugger arrives to the "get()", the error log shown above appears, and the app stops with this exception :
NoSuchMethodError (NoSuchMethodError: The method 'then' was called on null.
Receiver: null
Tried calling: then<Null>(Closure: (MagicUser) => Null))
Do you know what can cause this error? I already tried to add the NETWORK_ACCESS_STATE in my AndroidManifest, but nothing has changed.