DynamiteModule: Local module descriptor class for providerinstaller not found.
Steps to Reproduce
- Create a new Flutter app
- Standard link to Firebase android App, no SHA used.
- Add google-services.json and firebase integration: at build.gradle:
buildscript {
.....
repositories {
google()
......
}
......
dependencies {
.......
classpath 'com.google.gms:google-services:4.3.5'
}
}
.....
allprojects {
repositories {
google()
....
}
}
and at src/build.gradle:
......
apply plugin: 'com.google.gms.google-services'
.......
dependencies {
.......
implementation platform('com.google.firebase:firebase-bom:26.4.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
}
- Add to your pubspec.yaml file the firebase core and auth dependencies:
firebase_core: ^0.7.0
firebase_auth: ^0.20.0+1
At this point any code like Firebase.initializeApp() or FirebaseAuth.instance.signInAnonymously() should work fine,
- Add Firestore to pubspec.yaml:
cloud_firestore: ^0.16.0
But... It will be required to active multidex at your build.gradle in order to build.
defaultConfig {
.........
multiDexEnabled true
}
After multidex is enabled, errors start to be dropped. You don't need to use clod_firestore, just Firebase.initializeApp() will result in this warning messages, at least for me:
W/DynamiteModule(17125): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(17125): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(17125): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
And if I try to add some document to any collection:
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/om.hagans.smok(17125): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/System (17125): Ignoring header X-Firebase-Locale because its value was null.
Still documents are written at the firestore but sometimes (so much times!) apps break while processing any firebase feature.
Here is my flutter doctor:
[β] Flutter (Channel beta, 1.25.0-8.3.pre, on Microsoft Windows [VersiΓΒ³n 10.0.18363.1316], locale es-ES)
β’ Flutter version 1.25.0-8.3.pre at C:\flutter
β’ Framework revision 5d36f2e7f5 (3 weeks ago), 2021-01-14 15:57:49 -0800
β’ Engine revision 7a8f8ca02c
β’ Dart version 2.12.0 (build 2.12.0-133.7.beta)
[β] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
β’ Android SDK at C:\AndroidSDK
β’ Platform android-30, build-tools 30.0.3
β’ ANDROID_HOME = C:\AndroidSDK
β’ ANDROID_SDK_ROOT = C:\AndroidSDK
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
β’ All Android licenses accepted.
[β] Chrome - develop for the web
β’ Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[β] Android Studio (version 3.6)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin version 44.0.2
β’ Dart plugin version 192.7761
β’ Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[β] IntelliJ IDEA Community Edition (version 2020.3)
β’ IntelliJ at C:\Users\ruben\AppData\Local\JetBrains\IntelliJ IDEA Community Edition 2020.3.2
β’ Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin version 203.6912
[β] VS Code (version 1.52.1)
β’ VS Code at C:\Users\ruben\AppData\Local\Programs\Microsoft VS Code
β’ Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[β] Connected device (4 available)
β’ Aquaris C (mobile) β’ CX004705 β’ android-arm β’ Android 8.1.0 (API 27)
β’ Android SDK built for x86 (mobile) β’ emulator-5554 β’ android-x86 β’ Android 10 (API 29) (emulator)
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 88.0.4324.104
β’ Edge (web) β’ edge β’ web-javascript β’ Microsoft Edge 88.0.705.56
β’ No issues found!
And I've updated google services. IS NOT GOOGLE SERVICES ISSUE, at least in this case all started going wrong after enable multidex.
Hi @hagans I see there's an open issue addressing the case you described https://github.com/FirebaseExtended/flutterfire/issues/4447. Please follow up on that issue, I'm closing the current one as a duplicate. If you disagree, please write in the comments and I will reopen it. Thank you
Thanks you so much, I didn't saw this thread, posted there :)