Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Extremely long Firebase Auth login times after notarization on MacOS

Discussion in 'macOS' started by Jacob-Duniam, Jul 24, 2020.

  1. Jacob-Duniam

    Jacob-Duniam

    Joined:
    Apr 4, 2016
    Posts:
    5
    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.
     
    Last edited: Aug 3, 2020
    calebbbarton and Harrishun like this.
  2. andrews_unity

    andrews_unity

    Unity Technologies

    Joined:
    Dec 11, 2015
    Posts:
    264
    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 :(
     
  3. Jacob-Duniam

    Jacob-Duniam

    Joined:
    Apr 4, 2016
    Posts:
    5
    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.