Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXC_BAD_ACCESS code=2 on including Firebase/Auth in Podfile

I am getting EXC_BAD_ACCESS after including 'Firebase/Auth' in Podfile. This happens without adding any line of firebase code. I am using swift3 on xcode 8 and the resultant pods are -

Installing Firebase (3.8.0)
Installing FirebaseAnalytics (3.5.1)
Installing FirebaseAuth (3.0.6)
Installing FirebaseCore (3.4.4)
Installing FirebaseInstanceID (1.0.8)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.7)
Using GoogleAppUtilities (1.1.2)
Installing GoogleInterchangeUtilities (1.2.2)
Using GoogleSignIn (4.0.1)
Using GoogleSymbolUtilities (1.1.2)
Installing GoogleToolboxForMac 2.1.0 (was 2.1.0)
Using Localize-Swift (1.6)
Using ProtocolBuffers-Swift (3.0.6)
Using QorumLogs (0.9)

The error comes in Thread 1 in [UIViewController(FIRAScreenClassName) fira_viewDidAppear:]:

This happens only if the pod target is itself a framework which is embedded in an app eventually.

I do have Google analytics as well. Is it because ARC is not enabled? How do I do that on xcode-8? Any other options to try?

like image 963
adarsh Avatar asked Oct 28 '16 11:10

adarsh


2 Answers

There appears to be a problem in the latest Firebase/Core (3.8.0) release. Even @IBDesignable was crashing with a recursive call to the method signature you mentioned.

You have a couple of options:

  1. In Info.plist (app), set FirebaseAutomaticScreenReportingEnabled to NO (bool). This solved the problem for my running application, but IBDesignable resources caused this error on build:

file:///path/to/project/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (svZ-78-1Mn): The agent crashed

  1. You may want to temporarily downgrade to 3.7.1, for example,

    pod 'Firebase/Core', '~> 3.7.1'
    pod 'Firebase/Auth'
    pod 'Firebase/Database'
    

The rest of the dependencies should take care of themselves when you run pod update.

like image 74
Cameron Avatar answered Oct 14 '22 09:10

Cameron


I made a silly mistake. Never turned on Google under Authentication -> Sign in methods on Firebase

like image 35
Kavin Varnan Avatar answered Oct 14 '22 09:10

Kavin Varnan