Description
Description
Regarding the crash caused by the 16KB page size issue reported here, we have confirmed that the issue has been resolved in Firebase Unity SDK version 12.10.0
. However, we have encountered the following problem, which we would like to bring to your attention for further investigation.
When launching the app with a 16KB page size on a device that is not logged into a Google account, the following error occurs during Firebase initialization:
06-30 17:22:47.863 E/FirebaseInstanceId(13632): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
06-30 17:22:47.916 E/Unity (13632): FirebaseException: AUTHENTICATION_FAILED
Logging into a Google account on the device resolves the issue, and even after deleting the account from the device, the problem does not recur. However, if the device is reset and the app is launched again with no Google account logged in, the original error reappears. This suggests some issue related to devices that are not logged into a Google account.
Note: This problem does not occur on Android devices that are not set to a 16KB page size, nor does it occur on iOS devices.
Additionally, though the connection here is unclear, the error log references FirebaseInstanceId
. It appears that the latest version of com.google.firebase.instance-id
is 7.2.0
, released in May 2021, but this library has since been deprecated:
In our implementation, we do not explicitly specify the com.google.firebase.instance-id
library. This raises the concern that something unexpected might be happening inside the Firebase SDK's internal mechanisms. We wanted to highlight this as a potential cause and provide this information for further review.
Reproducing the issue
- Initialize the device and set it to a state where the Google account is logged out.
- Enable the 16KB page size.
- Execute FirebaseMessaging.GetTokenAsync() from an application that integrates Firebase SDK version 12.10.0.
- An AUTHENTICATION_FAILED error occurs.
Firebase Unity SDK Version
12.10.0
Unity editor version
2022.3.58f1
Installation Method
Unity Package Manager
Problematic Firebase Component(s)
Authentication
Other Firebase Component(s) in use
No response
Additional SDKs you are using
No response
Targeted Platform(s)
Android
Unity editor platform
Mac
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
06-30 17:22:40.738 I/firebase(13632): Firebase Analytics API Initializing
06-30 17:22:40.739 I/firebase(13632): analytics API Initialized
06-30 17:22:40.741 I/firebase(13632): Firebase Cloud Messaging API Initialized
06-30 17:22:40.753 I/Unity (13632): [***.Log]resolve all Firebase dependencies: Available
06-30 17:22:40.753 I/Unity (13632): <size=10><i>InitializeAsync() at FirebaseService.cs:172</i></size>
06-30 17:22:40.762 D/BackgroundInstallControlService( 1343): Package event received: 0
06-30 17:22:40.762 I/firebase(13632): Firebase Analytics API Initializing
06-30 17:22:40.762 I/firebase(13632): analytics API Initialized
06-30 17:22:40.763 I/firebase(13632): Firebase Cloud Messaging API Initialized
06-30 17:22:40.779 E/FirebaseInstanceId(13632): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
06-30 17:22:40.812 I/Unity (13632): Firebase Analytics API Initializing
06-30 17:22:40.812 I/Unity (13632): Firebase.AppUtilPINVOKE:PollCallbacks()
06-30 17:22:40.812 I/Unity (13632): Firebase.AppUtil:PollCallbacks()
06-30 17:22:40.812 I/Unity (13632): Firebase.Platform.FirebaseHandler:Update()
06-30 17:22:40.812 I/Unity (13632):
06-30 17:22:40.813 I/Unity (13632): analytics API Initialized
06-30 17:22:40.813 I/Unity (13632): Firebase.AppUtilPINVOKE:PollCallbacks()
06-30 17:22:40.813 I/Unity (13632): Firebase.AppUtil:PollCallbacks()
06-30 17:22:40.813 I/Unity (13632): Firebase.Platform.FirebaseHandler:Update()
06-30 17:22:40.813 I/Unity (13632):
06-30 17:22:40.814 I/Unity (13632): Firebase Cloud Messaging API Initialized
06-30 17:22:40.814 I/Unity (13632): Firebase.AppUtilPINVOKE:PollCallbacks()
06-30 17:22:40.814 I/Unity (13632): Firebase.AppUtil:PollCallbacks()
06-30 17:22:40.814 I/Unity (13632): Firebase.Platform.FirebaseHandler:Update()
06-30 17:22:40.814 I/Unity (13632):
06-30 17:22:47.833 I/Unity (13632): [***.Log]resolve all Firebase dependencies: Available
06-30 17:22:47.833 I/Unity (13632): <size=10><i>InitializeAsync() at FirebaseService.cs:172</i></size>
06-30 17:22:47.863 E/FirebaseInstanceId(13632): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
If using CocoaPods for Apple platforms, the project's Podfile.lock
Expand Podfile.lock
snippet
👀 Replace this line with the contents of your Podfile.lock!