Firebase Messaging on Android suddenly started crashing when message received

前端 未结 6 1902
长情又很酷
长情又很酷 2020-12-05 16:52

Currently using react native, react-native-firebase, and react-native-push-notification. Everything was fine until suddenly today firebase messaging started causing the app

相关标签:
6条回答
  • 2020-12-05 17:28

    This case is working for me:

    implementation "com.google.firebase:firebase-messaging:20.2.3"
    implementation "com.google.firebase:firebase-analytics:17.4.4"
    

    Ref to github issue

    0 讨论(0)
  • 2020-12-05 17:34

    This upgrade fixed the issue for me

    implementation 'com.google.firebase:firebase-messaging:20.2.3'
    
    0 讨论(0)
  • 2020-12-05 17:34

    This issue is fixed with latest version of this dependency. https://firebase.google.com/support/release-notes/android#messaging_v20-2-3

    0 讨论(0)
  • 2020-12-05 17:35

    Edit 07/09/2020: We have released firebase-iid and firebase-messaging versions 20.2.3 with a fix for this issue, please upgrade to the latest versions.


    [Firebaser here] It looks like yesterday's releases of firebase-messaging and firebase-iid contain a bug which can cause this crash. We are working hard on a fix.

    For now the best thing to do is to use the versions released on June 18th: https://firebase.google.com/support/release-notes/android#2020-06-18

    • com.google.firebase:firebase-messaging:20.2.1
    • com.google.firebase:firebase-iid:20.2.1

    We are working on a fix and hope to have a new release out soon. When we do I will update this answer and the release notes will be available here: https://firebase.google.com/support/release-notes/android

    0 讨论(0)
  • 2020-12-05 17:39

    We tried adding firebaseMessagingVersion = "20.2.1" into the ext section in the root project android/build.gradle which fixed it for us. We looked into the safeExtGet method and found that it would try to extract the top level variable from the root project file.

    By doing it in this way we didn't need to touch the node modules.

    ext {
            googlePlayServicesVersion = "16.+"
            firebaseVersion = "17.3.4"
            firebaseMessagingVersion = "20.2.1"
        }
    
    0 讨论(0)
  • 2020-12-05 17:41

    Exact same issue with these versions. And yes they were functional before this "@react-native-firebase/app": "^6.7.1", "@react-native-firebase/messaging": "^6.7.1",

    Issue Solved:

    1. Go to react-native-push-notification/build.gradle
    2. Change def firebaseVersion = safeExtGet('firebaseVersion', '+') to def firebaseVersion = safeExtGet('firebaseVersion', '20.2.1')

    It was picking us the version 20.2.2 which is not stable and was causing all kind of weird issues.

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