Search Unity

Firebase issue

Discussion in 'Unity Build Automation' started by samjoly, Mar 15, 2019.

  1. samjoly

    samjoly

    Joined:
    Apr 23, 2013
    Posts:
    30
    Hi Team,
    I'm trying to have Unity cloud building an iOS app including Firebase.
    Here is the type of error from the Unity cloud Log:

    [Unity] Error (Not a directory) occured whilst enumerating /BUILD_PATH/.../Pods/Headers/Private/Firebase/Firebase.h

    Any idea?
     
  2. madawe

    madawe

    Joined:
    Sep 13, 2015
    Posts:
    7
    I spent a lot of time trying to troubleshoot this same error a couple of weeks ago. I ended up having to remove firebase and use something else.
     
  3. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    I'm seeing this problem both in local builds and on unity cloud. With Unity 2018.3 and firebase 5.6. I can't build my app for iOS. Android builds fine.
     
  4. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
  5. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    Ok I got it building locally by building the workspace instead of the project.. but is that supported on unity cloud build? Trying it now...
     
  6. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    That link suggested adding some dependencies to two of the firebase libraries - I pushed that change and got a successful unity cloud build too. Thank you @victorw
     
    victorw likes this.
  7. samjoly

    samjoly

    Joined:
    Apr 23, 2013
    Posts:
    30
    Thanks everyone for your responses.
    So far no luck on my end - I have the libFirebaseCppApp.a, and libFirebaseCppAuth.a, in the Assets\Plugins\iOS\Firebase folder, but unity cloud build still end up with the same error.

    @chriszul , do you have the files in the same location?
     
  8. jediah_hutch

    jediah_hutch

    Joined:
    Dec 6, 2018
    Posts:
    5
    Where did you find these two files?
     
  9. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    62
    @samjoly maybe you should contact Firebase support. It should work out of the box on UCB. We have been building our project with Firebase over a year with different Firebase versions and never encountered any issue.
     
  10. gino_pisello

    gino_pisello

    Joined:
    Jun 24, 2013
    Posts:
    33
    I'm having the same issue and ave the libFirebaseCppApp.a and LibFirebaseCppAuth.a are in the correct folder.
     
  11. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    I resolved it by adding dependencies on GameKit framework and SafariServices framework to the two .a library files as mentioned in the linked thread;

    > To make a successful build I had to add a couple of missing frameworks (GameKit and SafariServices) to the Firebase library files within unity.

    Unity gives you a nice inspector window to add these dependencies for the libraries, so just check those two boxes for each of the library files.
     
    samjoly and gino_pisello like this.
  12. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    They were in the firebase folder mentioned by @samjoly
     
  13. samjoly

    samjoly

    Joined:
    Apr 23, 2013
    Posts:
    30
    Thanks a lot @chriszul! You guide me to the right path! Yeah! Works for me. Just in case that it can help other, here is a screenshoot of the inspector window to add the dependencies.

    Thanks everyone!

    .
    config.jpg
     
  14. Mr-Berni

    Mr-Berni

    Joined:
    Aug 29, 2017
    Posts:
    9
    This was very helpful and got my build to finish with success!

    Reading through the logs on the cloud build, I can still see a long list of - Error (Not a directory) occured whilst enumerating... bla bla bla

    Should I be concerned about this? will Firebase play nicely going forward implementing it in my game?
    Right now I am only using the auth .net 4 stuff for logging in users
     
  15. fennerjw

    fennerjw

    Joined:
    Mar 26, 2017
    Posts:
    1
    I wasn't able to get this to build until I added UserNotifications to all of the FrameworkDependencies as well. It doesn't show up in the list under Platform Settings, but you can add it directly to the .meta file for all of the libFirebase*.a files. Once you add in GameKit and SafariServices, edit the .meta file and change:

    FrameworkDependencies: GameKit;SafariServices;

    to

    FrameworkDependencies: GameKit;UserNotifications;SafariServices;

    Hope this helps someone else!
     
    gferrari likes this.
  16. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    We're still experiencing this issue even with the 3 frameworks enabled for all firebase libs - we are on 2019.2.10f1 and xcode 11.1
     
  17. artfabrique

    artfabrique

    Joined:
    Nov 8, 2012
    Posts:
    25
    I have the same errors.
     
  18. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    * We got it fixed, it was actually ok in the end, just needed to purge the build folder and we had fastlane errors buried away in the log which were causing issues - all good now afaik

    We are building locally, not with Unity Cloud
     
  19. kpatulrpatel

    kpatulrpatel

    Joined:
    Mar 13, 2017
    Posts:
    7
    ==================================
    Firebase Current Issues Solutions in Unity
    ==================================
    1) Firbase RemoveListener is not work in OnDestroy() or OnDisable() Method.
    Solution :-
    private void OnDisable()
    {
    DatabaseReference.GoOffline();
    }
    2) Firebase Services is Disable[Must Current Enabled or Firebase Initialized]
    Solution :-
    void StopFirebaseService()
    {
    Firebase.FirebaseDatabase.DefaultInstance.App.Dispose();
    }