Firestore Token retrieval failed: INVALID_SENDER

后端 未结 8 789
余生分开走
余生分开走 2020-12-20 12:09

I am not receiving any callback from interfaces such as addOnSuccessListener, addOnFailureListener,addOnCompleteListener.

Depe

相关标签:
8条回答
  • 2020-12-20 12:09

    Delete Project (App_Folder_Name)/app/ "build"

    delete entire build folder and rebuild it it will work. If only your jason file is correct

    0 讨论(0)
  • 2020-12-20 12:11

    If you have recently change your google-services.json file then just delete build folder from android project and re-build your project.

    0 讨论(0)
  • 2020-12-20 12:16

    Your buildVariant should be same as project in Firebase. Check buildTypes and productFlavors.

    0 讨论(0)
  • 2020-12-20 12:23

    To solve this, please change this line of code:

    classpath 'com.google.gms:google-services:3.2.1'
    

    to

    classpath 'com.google.gms:google-services:4.0.1'
    

    and

    implementation 'com.google.firebase:firebase-firestore:16.0.0'
    

    to

    implementation 'com.google.firebase:firebase-firestore:17.0.2'
    

    And also don't forget to add the following dependecy which is now mandatory:

    implementation 'com.google.firebase:firebase-core:16.0.1'
    

    Also if you need to use Firebase Messaging then you should also add the following dependency:

    implementation 'com.google.firebase:firebase-messaging:17.0.0'
    

    More informations here.

    0 讨论(0)
  • 2020-12-20 12:24

    I had the same problem.

    Turned out a team member had accidentally deleted the Firebase project.

    0 讨论(0)
  • 2020-12-20 12:27

    Sorry for late reply but you will get correct sender is from firebase.

    Got to firebase-> Select your project->Project setting->Cloud Messaging->Sender ID

    You will get your sender_id , copy that and use in your prroject it will solve your issue.

    0 讨论(0)
提交回复
热议问题