Search Unity

Question Unity Push Notifications with Firebase not working on mobile devices

Discussion in 'Player Engagement' started by MihailLuhov, Feb 17, 2023.

  1. MihailLuhov

    MihailLuhov

    Joined:
    Aug 10, 2020
    Posts:
    6
    Hello,

    I have recently integrated Unity Push Notifications and Firebase into my project. I followed the step-by-step integration from the unity docs and managed to build for both iOS and Android.

    When I create a notification and press Test on device by entering the device token, the mobile device receives the notification.
    However, when I schedule the notification, it never appears. I have allowed notifications on both the iOS and Android devices I am testing on but it seems that the notification does not even reach the phone (I checked the logs from the Android).
    When I tried to find any information in the Unity Dashboard, in the Reporting section of the notification it just says that all of my Send Attempts are Fails. It does not give any context on why it is failing.
    I suppose that there must be other settings I need to set up besides the ones described in the Push Notifications Integration in unity docs.

    Any ideas or information on the issue will be appreciated.
     
  2. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    282
    Hi MihailLuhov!
    Hope you are doing well. Thanks for reporting this. I have a few questions for you at the moment we are trying to create a quick docs for workaround with Firebase + Android. Did you have any issues having both packages together? What Firebase packages do you have installed in your application?

    What we believe is happening at the moment is that your notifications are indeed working with Firebase but conflicting with our SDK. However I will have the engineers confirm this.

    Could you send me in a direct message your orgid and project id?
     
  3. Keeinor

    Keeinor

    Joined:
    Sep 9, 2018
    Posts:
    2
    Heelo SebT_Unity,

    Any updates on the SDK? Or work around that could be implemented? Since I have the same issue in my project.
     
  4. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    282
    Hi @Keeinor,
    I have escalated this issue since we have many users who are stumbling on this problem. The main concern here is firebase sdk's and our sdk are clashing.
    We were able to reproduce the issue with Firebase Authentication and Firebase Messaging.

    We have a dated guide for firebase messaging however the authentication we are currently working on either a workaround or a patch to the SDK.

    If you would like to try the above guide please let me know if you have success.

    We will make a general forum post once we have more information.
     
    Keeinor likes this.
  5. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    282
    Hey folks,
    We've released a new version of Push Notifications 3.0.1-pre.1 patch is live! This should avoid Firebase duplicate dll errors.

    You can pull the file through the package manager by adding package from git url or add package by name and putting
    com.unity.services.push-notifications.

    upload_2023-3-24_10-16-18.png

    Please let us know if this new version fixes duplicate errors.
     
    Kasaie and Keeinor like this.