Skip to content

FCM registered on iOS device BEFORE initialization #657

Closed

Description

@novavision

Please fill in the following fields:

Unity editor version: 2018.4.16f1
Firebase Unity SDK version: 6.12.0, installed using .unitypackage
Firebase plugins in use (Auth, Database, etc.): Cloud Messaging
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook, AdMob
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

Please describe the issue here:

I am really not sure, is it an issue at all, but according to new GDPR rules we can't collect any data before user consent. I assume Firebase token use user/device ID to register a token.
I am worrying about the fact, that on iOS initial App start FCM initiates by itself and register a token. Here is a message I receive:
Firebase.FirebaseApp:InitializeAppUtilCallbacks() Firebase.FirebaseApp:CheckDependenciesAsync() Firebase.FirebaseApp:CheckAndFixDependenciesAsync() FirebaseManager:Start()
Which seems normal because my FirebaseManager checks for dependencies on Start, but doesn't trigger any Firebase class methods.

And at the end I receive this message:
2020-04-27 13:31:29.998354+0700 triviafight[15756:1376094] FCM: registration token received, but no listener set yet - cached the token. FCM: registration token received, but no listener set yet - cached the token. (Filename: ./Runtime/Export/Debug.bindings.h Line: 45) 2020-04-27 13:31:30.263793+0700 triviafight[15756:1376292] [] tcp_input [C8.1:3] flags=[R] seq=4207939554, ack=0, win=0 state=CLOSED rcv_nxt=4207939554, snd_una=1728814353 2020-04-27 13:31:30.264008+0700 triviafight[15756:1376292] [] tcp_input [C8.1:3] flags=[R] seq=4207939554, ack=0, win=0 state=CLOSED rcv_nxt=4207939554, snd_una=1728814353 2020-04-27 13:31:30.332955+0700 triviafight[15756:1376293] [Fabric] failed to download settings Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=403, type=2, request_id=, content_type=application/json; charset=utf-8} 2020-04-27 13:31:30.395753+0700 triviafight[15756:1376293] 6.17.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled 2020-04-27 13:31:30.429297+0700 triviafight[15756:1376293] [] tcp_input [C6.1:3] flags=[R] seq=539856417, ack=0, win=0 state=CLOSED rcv_nxt=539856417, snd_una=806563659 2020-04-27 13:31:30.430355+0700 triviafight[15756:1376293] [] tcp_input [C6.1:3] flags=[R] seq=539856417, ack=0, win=0 state=CLOSED rcv_nxt=539856417, snd_una=806563659 2020-04-27 13:31:30.597126+0700 triviafight[15756:1376293] [] tcp_input [C7.1:3] flags=[R] seq=1028349471, ack=0, win=0 state=CLOSED rcv_nxt=1028349471, snd_una=1736232985 2020-04-27 13:31:30.598726+0700 triviafight[15756:1376293] [] tcp_input [C7.1:3] flags=[R] seq=1028349471, ack=0, win=0 state=CLOSED rcv_nxt=1028349471, snd_una=1736232985 2020-04-27 13:31:31.366357+0700 triviafight[15756:1376094] FCM: registration token received, but no listener set yet - cached the token. FCM: registration token received, but no listener set yet - cached the token. (Filename: ./Runtime/Export/Debug.bindings.h Line: 45) 2020-04-27 13:31:31.367959+0700 triviafight[15756:1376292] 6.17.0 - [Firebase/InstanceID][I-IID003010] Successfully fetched default token.

If I am wrong and this doesn't violates GDPR, please close this ticket, but otherwise this problem should have investigation.

Please answer the following, if applicable:

Yes

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

Activity

  1. a-maurice commented on May 11, 2020

    @a-maurice
    Contributor

    Hi @novavision

    Sorry for the delay in getting back to you. You are correct that it registers for a token almost immediately, it does this based on the initialization of the library, so it can't be disabled programatically, though it can be disabled. For more information, check out: https://firebase.google.com/docs/reference/unity/class/firebase/messaging/firebase-messaging#tokenregistrationoninitenabled

  2. novavision commented on May 11, 2020

    @novavision
    Author

    The problem is that I have disabled "auto init enable" on both platforms but it works only on Android, on iOS it still auto initialized even setting this key in .plist

    <key>FirebaseMessagingAutoInitEnabled</key>
    <false/>
    
  3. novavision commented on May 16, 2020

    @novavision
    Author

    Why this issue closed? Please have a look on my last comment

  4. locked and limited conversation to collaborators on Jun 11, 2020
  5. DellaBitta commented on Feb 4, 2022

    @DellaBitta
    Contributor

    Hi @novavision,

    If your code invokes any FirebaseMessaging APIs then Messaging will enable even if you have the FirebaseMessagingAutoInitEnabled flag set to false in your .plist file. Could you double check that your application is still not invoking any methods in the Messaging API, including the configuration of listeners?

    Thanks!

  6. added
    needs-info
    and removed
    new
    on Feb 4, 2022
  7. google-oss-bot commented on Feb 11, 2022

    @google-oss-bot

    Hey @novavision. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

    If you have more information that will help us get to the bottom of this, just add a comment!

  8. added
    stale
    on Feb 11, 2022
  9. google-oss-bot commented on Feb 18, 2022

    @google-oss-bot

    Since there haven't been any recent updates here, I am going to close this issue.

    @novavision if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-by-botneeds-infostaletype: question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions