Extremely long Firebase Auth login times after notarization on MacOS

NOTE: We figured out what causes this issue, please see my reply to andrews_unity below.

Hey folks,

My team and I have encountered an issue with our Unity MacOS Standalone builds where login with Firebase Authentication results in extremely long (2-5 minutes) load times.

As part of our build process we notarize our builds to avoid GateKeeper prompts that prevent the app from opening, but this causes issues with Authentication where our email account login process subsequently takes 2-5 minutes to complete the request. Non-notarised builds do not have this issue and are able to complete the request in ~1 second. This issue is concerning because Notarization is mandatory in macOS Catalina and later, so our support of MacOS hinges on whether we can resolve this issue.

We suspect the issue has some relation to the Hardened Runtime, which limits some software capabilities (such as JIT compilation) to ensure system integrity. Using the Hardened Runtime is mandatory for Notarization to be successful, so we can’t go without it.

Our Firebase Storage and PostgreSQL database functionality works fine; other than login other downloads in the app perform without delay.

Things we have tried to resolve the issue:

  • Using older versions of XCode (11.6, 11.4, 11.2) - no change in behaviour
  • Updating our Firebase version from 6-10-0 to 6-15-2 - no change in behaviour
  • Performed the Notarization with different machines

Any insight into this issue would be greatly appreciated! We are happy to share more information as needed.

2 Likes

Ahoy, Nothing comes to mind right away why this would be an issue, have you reached out the firebase folks and asked them if they have seen any issues around this? I am not familiar with it enough to know why notarization specifically would cause issues :frowning:

Thank you for the response @andrews_unity ! In the process of trying to repro the issue in a minimal project to log the bug with Firebase, we realised it isn’t specifically Auth that causes the issue, however part of our login process involves a DatabaseReference.GetValueAsync() that seems to take about 1-2 minutes only on notarised builds. Thankfully we can work around this issue and we’re going to log this issue with Firebase.