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.