quickstart-unity: Can't get Crashlytics or Analytics to work
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.2.0b2.3094
- Firebase Unity SDK version: 6.15.2
- Source you installed the SDK: Unity Package Manager (.unitypackage or Unity Package Manager)
- Problematic Firebase Component: Crashlytics, Analytics (Auth, Database, etc.)
- Other Firebase Components in use: none (Auth, Database, etc.)
- Additional SDKs you are using: none (Facebook, AdMob, etc.)
- Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
- Platform you are targeting: iOS (iOS, Android, and/or desktop)
- Scripting Runtime: Not sure what this means (Mono, and/or IL2CPP)
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Steps to reproduce:
I follow Getting Started guides and also checked the example projects here and ended up with this code:
public virtual void Start()
{
Firebase.FirebaseApp.LogLevel = Firebase.LogLevel.Debug;
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
{
dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available)
{
InitializeFirebase();
Debug.Log("Firebase ready to use");
}
else
{
Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus);
}
});
}
// Handle initialization of the necessary firebase modules:
void InitializeFirebase()
{
var app = FirebaseApp.DefaultInstance;
FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
firebaseInitialized = true;
Firebase.Analytics.FirebaseAnalytics.LogEvent(Firebase.Analytics.FirebaseAnalytics.EventAppOpen);
throw new System.Exception("test exception please ignore");
}
The i compiled the app and ran it on a physical device and these are my logs:
CrashReporter: initialized
2020-09-24 14:02:02.975958-0400 Nodeshifter[765:116506] Built from 'trunk' branch, Version '2020.2.0b2 (90b2443a8df1)', Build type 'Release', Scripting Backend 'il2cpp'
-> applicationDidFinishLaunching()
Loading player data from /private/var/containers/Bundle/Application/BD399514-47CD-4C83-AA49-B792C44B8C5C/Nodeshifter.app/Data/data.unity3d
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A10 GPU
Initialize engine version: 2020.2.0b2 (90b2443a8df1)
2020-09-24 14:02:03.576377-0400 Nodeshifter[765:116755] 6.24.0 - <AppMeasurement>[I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
<UnityPortraitOnlyViewController: 0x1031485a0>
2020-09-24 14:02:03.940088-0400 Nodeshifter[765:116506] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x103253cf0>.
2020-09-24 14:02:04.135576-0400 Nodeshifter[765:116768] 6.24.0 - <AppMeasurement>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
UnloadTime: 2.122875 ms
2020-09-24 14:02:08.365879-0400 Nodeshifter[765:116506] DEBUG: Disabling all app initializers
2020-09-24 14:02:08.365993-0400 Nodeshifter[765:116506] DEBUG: Disable analytics
Enable module 'analytics' for 'Firebase.Analytics.FirebaseAnalytics, Firebase.Analytics'
2020-09-24 14:02:08.366420-0400 Nodeshifter[765:116506] DEBUG: analytics app initializer Enabling
2020-09-24 14:02:08.366533-0400 Nodeshifter[765:116506] DEBUG: App initializer auth not found, failed to enable.
2020-09-24 14:02:08.366597-0400 Nodeshifter[765:116506] DEBUG: App initializer crashlytics not found, failed to enable.
2020-09-24 14:02:08.366657-0400 Nodeshifter[765:116506] DEBUG: App initializer database not found, failed to enable.
2020-09-24 14:02:08.366801-0400 Nodeshifter[765:116506] DEBUG: App initializer dynamic_links not found, failed to enable.
2020-09-24 14:02:08.366861-0400 Nodeshifter[765:116506] DEBUG: App initializer functions not found, failed to enable.
2020-09-24 14:02:08.367104-0400 Nodeshifter[765:116506] DEBUG: App initializer instance_id not found, failed to enable.
2020-09-24 14:02:08.367187-0400 Nodeshifter[765:116506] DEBUG: App initializer invites not found, failed to enable.
2020-09-24 14:02:08.367323-0400 Nodeshifter[765:116506] DEBUG: App initializer messaging not found, failed to enable.
2020-09-24 14:02:08.367589-0400 Nodeshifter[765:116506] DEBUG: App initializer performance not found, failed to enable.
2020-09-24 14:02:08.367683-0400 Nodeshifter[765:116506] DEBUG: App initializer remote_config not found, failed to enable.
2020-09-24 14:02:08.367755-0400 Nodeshifter[765:116506] DEBUG: App initializer storage not found, failed to enable.
2020-09-24 14:02:08.367844-0400 Nodeshifter[765:116506] DEBUG: App initializer test_lab not found, failed to enable.
2020-09-24 14:02:08.376403-0400 Nodeshifter[765:116506] DEBUG: Creating Firebase App __FIRAPP_DEFAULT for Firebase C++ 6.15.1
2020-09-24 14:02:08.382573-0400 Nodeshifter[765:116506] [Firebase/Crashlytics] Version 4.1.0
2020-09-24 14:02:08.394312-0400 Nodeshifter[765:116506] DEBUG: Added app name=__FIRAPP_DEFAULT: options, api_key=AIzaSyC7bk7AKhtOnNtR1zI5Rwl2n6gtmt3lqm8, app_id=1:1057174381533:ios:287efeb2ccead21d, database_url=https://nodeshifter.firebaseio.com, messaging_sender_id=1057174381533, storage_bucket=nodeshifter.appspot.com, project_id=nodeshifter (0x1e2920f0)
2020-09-24 14:02:08.537627-0400 Nodeshifter[765:116788] 6.24.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2020-09-24 14:02:08.662842-0400 Nodeshifter[765:116788] 6.24.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60500000 started
2020-09-24 14:02:08.664304-0400 Nodeshifter[765:116788] 6.24.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
Setting up 1 worker threads for Enlighten.
Thread -> id: 16e9bf000 -> priority: 1
2020-09-24 14:02:10.038942-0400 Nodeshifter[765:116788] 6.24.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-09-24 14:02:10.054248-0400 Nodeshifter[765:116788] 6.24.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
2020-09-24 14:02:10.157746-0400 Nodeshifter[765:116760] 6.24.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
So as you can see it’s weird, in some areas it says it’s setup, but others says it’s not ready. And in my console, I’m still seeing this:
And on the live StreamView i see nothing.
Is there anything else I’m missing?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (9 by maintainers)
This is correct, neither Crashlytics nor Analytics have desktop support (see this matrix). All calls into these SDKs will silently no-op to avoid crashing the Unity Editor.
@kmkho
In Unity SDK
6.16.0
, we did bump up FirebaseCrashlytics Pod version to4.6.1
. However, we are going to bump up Android SDK version to17.2.2
only in the next patch release. I think it is safe to bump up yourself manually to17.1.1
but not above, as mentioned here.