-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[cloud_firestore]: When Fetching(write, read, create) data from firebaseFireStore, I'm getting this error #13486
Comments
I am experiencing the same issue. After creating a new project and setting up Firebase, I encounter the same error when trying to write data to Firestore. Note: Whether you set up Firebase using the Firebase CLI or follow the documentation manually, you still encounter the same error. |
I have the same problem. I encounter this error when I try to write data to Firestore and I haven't found a solution yet. When I try to install with Firebase CLI, the result is the same. Can anyone who has experienced this problem and solved it help me? |
i have same problem when i request first time it is showing error like this |
the first time mine works, after that errors all over the palce. |
try {
ProviderInstaller.installIfNeeded(context)
} catch (GooglePlayServicesRepairableException e) {
// Prompt user to update Play Services
} catch (GooglePlayServicesNotAvailableException e) {
// Play Services not available
}
|
I checked json file directory and fingerptints. There is no problem with these. However, The code block you share, when I paste it, it doesn't recognize de ProviderInstaller class |
maybe try adding implementation 'com.google.android.gms:play-services-base:18.2.0' in build.gradle (app-level) If this still does not work let's go through the error more precisely |
I implement "implementation 'com.google.android.gms:play-services-base:18.2.0'" to app-level build.gradle file to dependecies but i does not work |
can you provide a repo where you could reproduce the error in that app, keep apikey as .env rest same
|
Which apikey. Apikeys in the google-services.json file?
|
yes in json , all specific to you configurations remove that or if since we are doing for testing purposes you can keep it same and reproduce the error their so that i can pr to fix it. If it still persists then it might be due to deprecated flutterfire_cli |
I marked repo as test. So didnt change the apikey. It is the repo link : https://github.com/vedatsalmis/testapp
|
without adding anything to code, just configuring flutterfire_cli i was getting D/CompatChangeReporter( 4674): Compat change id reported: 150939131; UID 10196; state: ENABLED where the comments above I/flutter are due to deprecated versions not being resolved, they are warnings and the o/p addition is done : So yes it might be a warning for the sdk which i dont think so is conflicting with development of the app |
Failed to get service from broker. So, is there anything that can be done to get rid of these warnings and error messages? Note : I didnt create the project with flutterfire_cli |
Yes there are many ways to suppress the warnings and error messages but its recommended to keep those getting logged until and unless you face no issues after complete development, these are useful later for debugging. Otherwise you can use these to supress them (works not for all but some):
Moreover I strongly advise you to keep developing as these errors do not block stream or create conflicts. Also use cli for configurations as it is highly granular and flexible |
also @vedatsalmis you can close the issue if you are satisfied |
FirebaseFirestore.instance.settings = const Settings( FirebaseFirestore.instance.setLoggingEnabled(false); I tried what you wrote above but I keep getting this message : Failed to get service from broker. E/GoogleApiManager( 9614): java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'. E/GoogleApiManager( 9614): at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) E/GoogleApiManager( 9614): at android.os.Parcel.createException(Parcel.java:3041) E/GoogleApiManager( 9614): at android.os.Parcel.readException(Parcel.java:3024) E/GoogleApiManager( 9614): at android.os.Parcel.readException(Parcel.java:2966) E/GoogleApiManager( 9614): at amrz.a(:com.google.android.gms@[email protected] (190800-681941525):36) E/GoogleApiManager( 9614): at amqg.z(:com.google.android.gms@[email protected] (190800-681941525):143) E/GoogleApiManager( 9614): at alxh.run(:com.google.android.gms@[email protected] (190800-681941525):54) E/GoogleApiManager( 9614): at android.os.Handler.handleCallback(Handler.java:958) E/GoogleApiManager( 9614): at android.os.Handler.dispatchMessage(Handler.java:99) E/GoogleApiManager( 9614): at bqww.mv(:com.google.android.gms@[email protected] (190800-681941525):1) E/GoogleApiManager( 9614): at bqww.dispatchMessage(:com.google.android.gms@[email protected] (190800-681941525):5) E/GoogleApiManager( 9614): at android.os.Looper.loopOnce(Looper.java:205) E/GoogleApiManager( 9614): at android.os.Looper.loop(Looper.java:294) E/GoogleApiManager( 9614): at android.os.HandlerThread.run(HandlerThread.java:67) |
Hi @vedatsalmis , thanks for the report. I was not able to reproduce this issue. I created a new flutter project and configured it with |
Here is the situation; I got this error when I upgraded Flutter in existing projects for years. Later, when I created a project from scratch and tried it, I saw that I got the same error in that project. When I added an existing project to Firebase again with CLI, I got the same error again when a function related to Cloud Firestore was triggered. Update : ( I created a new flutter project and configured it with flutterfire_cli but same error) |
Can you try updating your Google Play Services? |
I have already done it |
Yes, I tried it on my physical device and got the same error. I tried deleting the emulator and reinstalling it but nothing changed. |
I'm also having the same issue |
Same here. Just added firestore to an existing project, and am getting these errors. Everything else seems to be running okay, but I want to resolve these errors that pop up multiple times, every time I run my project. |
Hi @vedatsalmis, I'm finding it hard to reproduce this issue. I tested on your testapp repo and it seems to work fine on my end. |
Yes, but as you can see, I am not the only one experiencing this problem. Almost every day, I receive comments saying that I am experiencing the same problem. Therefore, I think the problem is more widespread. |
I also had this problem with two projects that were working just fine. I did use Setting Hope the OP and everybody else can solve this as well! EditAs a possible link for someone (found while searching) firebase/firebase-android-sdk#5024 there was also this list with crashlytics |
@vedatsalmis - Look at you stack trace, there is no mention of any FlutterFire package: E/GoogleApiManager( 9614): java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'. E/GoogleApiManager( 9614): at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) E/GoogleApiManager( 9614): at android.os.Parcel.createException(Parcel.java:3041) E/GoogleApiManager( 9614): at android.os.Parcel.readException(Parcel.java:3024) E/GoogleApiManager( 9614): at android.os.Parcel.readException(Parcel.java:2966) E/GoogleApiManager( 9614): at amrz.a(:com.google.android.gms@[email protected] (190800-681941525):36) E/GoogleApiManager( 9614): at amqg.z(:com.google.android.gms@[email protected] (190800-681941525):143) E/GoogleApiManager( 9614): at alxh.run(:com.google.android.gms@[email protected] (190800-681941525):54) E/GoogleApiManager( 9614): at android.os.Handler.handleCallback(Handler.java:958) E/GoogleApiManager( 9614): at android.os.Handler.dispatchMessage(Handler.java:99) E/GoogleApiManager( 9614): at bqww.mv(:com.google.android.gms@[email protected] (190800-681941525):1) E/GoogleApiManager( 9614): at bqww.dispatchMessage(:com.google.android.gms@[email protected] (190800-681941525):5) E/GoogleApiManager( 9614): at android.os.Looper.loopOnce(Looper.java:205) E/GoogleApiManager( 9614): at android.os.Looper.loop(Looper.java:294) E/GoogleApiManager( 9614): at android.os.HandlerThread.run(HandlerThread.java:67) I did a quick google of your issue, and here is a possible solution. |
These logs appear when I use firestore functions |
its likely the problem with how you configure firebase.
|
In my case, it was showing when I got some data from Firebase Firestore the first time, but every time after that was just fine. |
Can I see your build.gradle files and settings.gradle file? |
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "1.9.24" apply false
}
include ":app"
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '12'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.4.1'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "id"
minSdkVersion 23
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:33.4.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.android.gms:play-services-base:18.2.0'
} |
today, another update was enable and I updated Google Play Services on Google Play Store. After updating, my logs turned to this when I use firestore function :
|
@FMorschel thanks for the share but it does not work :( |
@vedatsalmis Having the exact same issue as the last log entries you provided. I went through and tried all the suggestions in this thread and am still receiving the same issue. Have you gotten around this yet? |
Might be a google related issue: https://issuetracker.google.com/issues/369219148 Worth giving a plus 1 there as well. |
We got around this issue by using another device with different google play services version. Original Issue On:
Not Observed On:
|
How did you get the Google Play service to the desired version? |
By the way, there is a situation like this: After wiping the emulator data, I do not receive this error until I receive the notification that Google Play Protect has been activated. |
But this does not contribute to the solution. After all, we cannot decide which version users will use. |
It may if it helps the team figure out what is wrong =D EditNot sure since I've never used the issue tracker https://issuetracker.google.com/issues/369219148 but posting this there maybe can help. |
Is there an existing issue for this?
Which plugins are affected?
cloud_firestore
Which platforms are affected?
Android
Description
When I press the button to add data to firestore, I get this error. When the application is running and I press the same button again later, I do not get this error a second time. Even though I get this error, it saves the data to firestore properly.
Note :
I encounter the same error whether I perform the Firebase setup by referring to the documentation or use the Firebase CLI for the installation.
Reproducing the issue
After the application is built, when I press the button, an error occurs. When I press the same button again, no error occurs. But even when an error message occurs, it saves the data to firestore properly.
1- Launch the application on an Android device.
2- press the floating action button.
Firebase Core version
3.6.0
Flutter Version
3.24.3
Relevant Log Output
Flutter dependencies
Additional context and comments
main.dart
settings.gradle
AndroidManifest.xml
flutter doctor -v
android/app/build.gradle
android/build.gradle
firestore rules
The text was updated successfully, but these errors were encountered: