31

I am getting this error that's causing the AppDelegate to crash

Terminating app due to uncaught exception 'com.google.greenhouse', reason: 'Error Domain=com.google.greenhouse Code=-102 "Unable to correctly configure subspec Analytics" UserInfo={NSLocalizedFailureReason=Tracking ID must not be nil or empty., NSLocalizedDescription=Unable to correctly configure subspec Analytics}'

I have followed the Firebase guide from here

What can be the reason? Also I don't intend to use google analytics as for now. Any fix?

EDIT:

Location of GoogleService-Info.plist

Note: I have removed the IDs and the Keys for this screenshot GoogleService-Info.plist content

7
  • your googleinfo plist is probably not at correct location or nil
    – Shubhank
    Jun 6, 2016 at 15:23
  • Where should the GoogleInfo.plist be loacted? @Shubhank
    – MrDank
    Jun 6, 2016 at 15:25
  • where is it in your project. post the screenshot of its location. It should be where the .xcode project is
    – Shubhank
    Jun 6, 2016 at 15:25
  • It is inside Supporting Files along with Info.Plist @Shubhank
    – MrDank
    Jun 6, 2016 at 15:29
  • @DarthVader have you get solution to this issue? I am facing same issue. please help me if you got any solution. Jun 7, 2016 at 13:56

9 Answers 9

112

The accepted solution was to remove Google Analytics. But you actually can have both Firebase and Google Analytics. The solution I found was to add TRACKING_ID into GoogleService-Info.plist

for example, add this:

<dict>
    <key>TRACKING_ID</key>
    <string>UA-XXXXXX-X</string>
4
  • 4
    from where i can get the value of tracking iD? Dec 28, 2016 at 12:14
  • I'm glad this helps. @jayantrawat you should get this from google analytics Dec 30, 2016 at 17:13
  • I think GA stopped allowing the use of mobile app tracking in GA. Today I tried and could not get a tracking ID. The only option was to use Firebase.
    – funct7
    Jun 12, 2017 at 0:56
  • Well, ideally it should be accepted answer. To get tracking id open your google analytics and go to select your project ->Admin->Tracking Info->Tracking Code->Tracking ID Feb 6, 2019 at 8:42
18

I asked the Firebase team on this issue and they have responded.

Things you can check if the issue still persist. Check to see that the GoogleService-Info.plist file is at the correct location i.e at the project root. Check your IS_ANALYTICS_ENABLED in the google plist. Try changing it. Try removing pod 'Google/Analytics'. Add -FIRAnalyticsDebugEnabled to get more debugging information.

My problem was solved by removing Google/Analytics pod.

1
  • My problem was solved by removing Google/Analytics pod. (Y)
    – Zeeshan
    Mar 27, 2017 at 10:39
10

We had the exact same error and solved by removing

pod 'Google/Analytics'

from Podfile.

In our case, we had been using GA and switch to Firebase + TagManager Solution, but just forgot to remove 'Google/Analytics' from Podfile. (Even we remove 'Google/Analytics', TagManager installs GoogleAnalytics for dependencies but errors are gone. Curious but it works...)

0
4

If would like to have both Google Analytics and Firebase. Please add two lines of code in GoogleService-Info file. Hope it will help

 <key>TRACKING_ID</key>
<string>UA-123456789-0</string>
3

Enable/Disable Services That You Want in my Case i only need Analytics so i set YES in IS_ANALYTICS_ENABLED and Other services set to NO.

Source

3

Delete From Podfile --> pod 'Google/Analytics'

1

If it was not the location of your googleservice-info.plist file. Check your IS_ANALYTICS_ENABLED in the google plist. Maybe try changing it to the opposite of what it currently is. Also, you can add this launch option to get more debug info. Maybe it will help. Product -> Scheme -> Edit Scheme -> Arguments passed on launch:

-FIRAnalyticsDebugEnabled 
0
0

None of the solutions suggested here worked for me. The only thing that did was disabling Firebase Analytics, by adding "FIREBASE_ANALYTICS_COLLECTION_ENABLED" (Boolean) to GoogleService-Info.plist and setting it to "NO" (taken from: https://firebase.google.com/support/guides/disable-analytics)

-1

Make sure the GoogleService-Info.plist file is at the correct location i.e at the project root.

I have added a screenshot of my project for you to check for reference.

enter image description here

7
  • can you show your location of plist and the plist content by updating the question
    – Shubhank
    Jun 7, 2016 at 5:50
  • Check it out @Shubhank
    – MrDank
    Jun 7, 2016 at 6:08
  • from the error it seems to be crashing cause of analytics being enabled for your app. can you try setting it to NO in plist - clean app and re run to check if it works
    – Shubhank
    Jun 7, 2016 at 6:10
  • IS_ANALYTICS_ENABLED is set to NO in my app.
    – MrDank
    Jun 7, 2016 at 6:12
  • 1
    okay, can you also check if the plist is actually added to the current target ? it might just not be in the copy resources section and not being bundled to the app during compile.
    – Shubhank
    Jun 7, 2016 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.