Closed jlubeck closed 3 years ago
I was able to make Analytics work by using -FIRDebugEnabled
. So I assume that was just a timing issue with non debugging devices.
I'm still unable to get Crashlytics to receive an event though
Hi, thanks for reporting an issue.
For your first bit - analytics does take a bit of time to propagate. You'll likely see one user within minutes of first adding Firebase, but events take time to propagate (they'll usually get batched every hour, and your first report will happen after 24 hours. Debug mode just forces them to upload immediately and populates DebugView in your console).
For Crashlytics, can I have you try one thing? Crash reports are only sent up on the next run of your game. So if an exception is recording this run, you need to quit your game and relaunch it without reinstalling. This means that you'll want to exit your game via the multitasking menu on iOS then relaunch it from springboard (not via XCode). If you trigger an exception, quit your game, and relaunch it entirely within iOS and Crashlytics doesn't update within a few minutes then there is a deeper issue that we should look into!
Hey @patm1987 I tried what you told me, but still not seeing anything in the console. I also tried running the app without compiling, and this is what I see in the logs:
CrashReporter: initialized
2020-09-28 11:27:05.496787-0400 Nodeshifter[467:112986] DEBUG: App initializer crashlytics not found, failed to enable.
at CrashlyticsTester.throwExceptionEvery60Updates () [0x00000] in <00000000000000000000000000000000>:0
2020-09-28 11:27:05.544072-0400 Nodeshifter[467:112986] [Firebase/Crashlytics] Version 4.1.0
2020-09-28 11:27:05.620128-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPad6,8, 13.3.1 (17D50)
2020-09-28 11:27:05.620481-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
2020-09-28 11:27:05.620621-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled.
2020-09-28 11:27:05.620763-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup
at CrashlyticsTester.throwExceptionEvery60Updates () [0x00000] in <00000000000000000000000000000000>:0
at CrashlyticsTester.throwExceptionEvery60Updates () [0x00000] in <00000000000000000000000000000000>:0
at CrashlyticsTester.throwExceptionEvery60Updates () [0x00000] in <00000000000000000000000000000000>:0
The last 3 lines are examples of me crashing the app.
Looks like I'm also not the only one having an issue with crashlytics: https://github.com/firebase/quickstart-unity/issues/798
Hi @jlubeck, from your log I see this line: DEBUG: App initializer crashlytics not found, failed to enable. This indicates you might not have the crashlytics sdk installed correctly. Can you double check your project has the following files under Assets->Firebase->Plugins->iOS?
Hi @cynthiajoan thank you for your reply. I did see that message which thought it was strange. But right below it you can also see:
2020-09-28 11:27:05.620128-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPad6,8, 13.3.1 (17D50)
2020-09-28 11:27:05.620481-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
2020-09-28 11:27:05.620621-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled.
2020-09-28 11:27:05.620763-0400 Nodeshifter[467:113222] 6.29.0 - [Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup
I don't have those files there, but I'm guessing it's because I installed through the package manager. I have them here:
Hi @jlubeck
Here is what I tried:
Throw Exception
button, which will throw an uncaught exception.
https://github.com/firebase/quickstart-unity/blob/master/crashlytics/testapp/Assets/Firebase/Sample/Crashlytics/UIHandler.cs#L69Firebase console > Crashlytics
and selected the correct app id. The page was not available immediately and it did show that welcome page in the beginning. But I think it refreshed after a couple of minutes.Event type = "Crashes"
. I can see the "Non-fatal" issues as the following picture. (See ThrowUncaughtException
)
I think if you throw an exception in C# level, Unity usually captures it and prevents a fatal crash.
Could you try the quickstart and verify if you can see those non-fatal issues?
Shawn
I am also using Firebase SDK 6.15.2 through UPM, Unity 2019.4.11f1, and events are not appearing in my console for iOS. I had the same issue for Android, but was able to fix it thanks to this thread: https://github.com/firebase/quickstart-unity/issues/798. The Android problem was that 6.15.2 includes Crashlytics 17.0.0, but the console wants 17.1.1. I think iOS has the same issue: 6.15.2 includes Crashlytics 4.1.0 but wants 4.3.0 (as stated in that green box on the console page). The fix for Android was to add crashlytics 17.1.1 to a Dependencies.xml under an Editor folder. Is there a similar workaround for iOS?
@kmkho
In Unity SDK 6.16.0
, we did bump up FirebaseCrashlytics Pod version to 4.6.1
. However, we are going to bump up Android SDK version to 17.2.2
only in the next patch release. I think it is safe to bump up yourself manually to 17.1.1
but not above, as mentioned here.
Seems like there was some issue with Crashlytics backend and should be resolved now. https://github.com/firebase/quickstart-unity/issues/798#issuecomment-712446848
FYI, we released 6.16.1
which is using Crashlytics Android SDK 17.2.2
now
Hey @jlubeck. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hi @jlubeck
Here is what I tried:
- I used Unity 2020.1.6f1, Firebase SDK 6.15.2 through UPM and Crashlytics quickstart
- I clicked on
Throw Exception
button, which will throw an uncaught exception. https://github.com/firebase/quickstart-unity/blob/master/crashlytics/testapp/Assets/Firebase/Sample/Crashlytics/UIHandler.cs#L69- I force close the app and relaunch it (since this is when the crash report is sent) https://github.com/firebase/quickstart-unity/blob/master/crashlytics/testapp/Assets/Firebase/Sample/Crashlytics/UIHandler.cs#L158
- I went to
Firebase console > Crashlytics
and selected the correct app id. The page was not available immediately and it did show that welcome page in the beginning. But I think it refreshed after a couple of minutes.- And I removed the filter
Event type = "Crashes"
. I can see the "Non-fatal" issues as the following picture. (SeeThrowUncaughtException
)![]()
I think if you throw an exception in C# level, Unity usually captures it and prevents a fatal crash.
Could you try the quickstart and verify if you can see those non-fatal issues?
Shawn
I still can't get the console to change that initial screen. Doesn't look like anything is being sent, even following all this to the letter.
I upgraded Firebase to the latest version (6.16.1) I have this on my Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
target 'UnityFramework' do
pod 'AppsFlyerFramework', '6.0.7'
pod 'Firebase/Analytics', '6.32.2'
pod 'Firebase/Core', '6.32.2'
pod 'Firebase/Crashlytics', '6.32.2'
end
And these are my latest logs AFTER crashing, AFTER killing the app and AFTER reopening
2020-10-29 17:29:22.477919-0400 Nodeshifter[4617:1787584] - <AppMeasurement>[I-ACS036001] Analytics screen reporting is disabled. UIViewController transitions will not be logged.
CrashReporter: initialized
2020-10-29 17:29:23.144813-0400 Nodeshifter[4617:1787092] Built from '2020.2/staging' branch, Version '2020.2.0b8 (dff91d65251a)', Build type 'Release', Scripting Backend 'il2cpp'
-> applicationDidFinishLaunching()
2020-10-29 17:29:25.949695-0400 Nodeshifter[4617:1787092] got didFinishLaunching = (null)
-> applicationDidBecomeActive()
2020-10-29 17:29:25.951151-0400 Nodeshifter[4617:1787092] got didBecomeActive(out) = (null)
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A10 GPU
Initialize engine version: 2020.2.0b8 (dff91d65251a)
2020-10-29 17:29:27.284851-0400 Nodeshifter[4617:1787092] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x13de5ccc0>.
UnloadTime: 0.684250 ms
2020-10-29 17:29:29.750237-0400 Nodeshifter[4617:1787092] DEBUG: Disabling all app initializers
2020-10-29 17:29:29.750366-0400 Nodeshifter[4617:1787092] DEBUG: Disable analytics
Enable module 'analytics' for 'Firebase.Analytics.FirebaseAnalytics, Firebase.Analytics'
2020-10-29 17:29:29.750546-0400 Nodeshifter[4617:1787092] DEBUG: analytics app initializer Enabling
2020-10-29 17:29:29.750613-0400 Nodeshifter[4617:1787092] DEBUG: App initializer auth not found, failed to enable.
2020-10-29 17:29:29.750675-0400 Nodeshifter[4617:1787092] DEBUG: App initializer crashlytics not found, failed to enable.
2020-10-29 17:29:29.750741-0400 Nodeshifter[4617:1787092] DEBUG: App initializer database not found, failed to enable.
2020-10-29 17:29:29.750832-0400 Nodeshifter[4617:1787092] DEBUG: App initializer dynamic_links not found, failed to enable.
2020-10-29 17:29:29.751352-0400 Nodeshifter[4617:1787092] DEBUG: App initializer functions not found, failed to enable.
2020-10-29 17:29:29.751426-0400 Nodeshifter[4617:1787092] DEBUG: App initializer instance_id not found, failed to enable.
2020-10-29 17:29:29.751499-0400 Nodeshifter[4617:1787092] DEBUG: App initializer invites not found, failed to enable.
2020-10-29 17:29:29.751565-0400 Nodeshifter[4617:1787092] DEBUG: App initializer messaging not found, failed to enable.
2020-10-29 17:29:29.751626-0400 Nodeshifter[4617:1787092] DEBUG: App initializer performance not found, failed to enable.
2020-10-29 17:29:29.751686-0400 Nodeshifter[4617:1787092] DEBUG: App initializer remote_config not found, failed to enable.
2020-10-29 17:29:29.751860-0400 Nodeshifter[4617:1787092] DEBUG: App initializer storage not found, failed to enable.
2020-10-29 17:29:29.751948-0400 Nodeshifter[4617:1787092] DEBUG: App initializer test_lab not found, failed to enable.
AppsFlyer SDK version 6.0.7 started build (7);
2020-10-29 17:29:29.772418-0400 Nodeshifter[4617:1787092] DEBUG: Creating Firebase App __FIRAPP_DEFAULT for Firebase C++ 6.16.1
2020-10-29 17:29:29.778277-0400 Nodeshifter[4617:1787569] 6.32.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-10-29 17:29:29.780326-0400 Nodeshifter[4617:1787092] [Firebase/Crashlytics] Version 4.6.2
2020-10-29 17:29:29.834467-0400 Nodeshifter[4617:1787092] DEBUG: Added app name=__FIRAPP_DEFAULT: options, api_key=AIzaSyC7bk7AKl2n6gtmt3lqm8, app_id=1:1057174533:ios:287efeb2c21d, database_url=https://nodeshifter.firebaseio.com, messaging_sender_id=105717533, storage_bucket=nodeshifter.appspot.com, project_id=nodeshifter (0x414e5f30)
Firebase ready to use
Setting up 1 worker threads for Enlighten.
Thread -> id: 16f3ef000 -> priority: 1
2020-10-29 17:29:30.279383-0400 Nodeshifter[4617:1787583] 6.32.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-10-29 17:29:30.279928-0400 Nodeshifter[4617:1787583] 6.32.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60802000 started
2020-10-29 17:29:30.280412-0400 Nodeshifter[4617:1787583] 6.32.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
Loaded 6 locales. Active locale English (en)
2020-10-29 17:29:30.367994-0400 Nodeshifter[4617:1787727] 6.32.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-10-29 17:29:30.383798-0400 Nodeshifter[4617:1787727] 6.32.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
2020-10-29 17:29:30.386311-0400 Nodeshifter[4617:1787727] 6.32.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
AppsFlyer_Unity_v6.0.7 didReceiveConversionData called with {"adset":null,"click_time":"2020-10-26 21:33:15.508","af_sub2":null,"esp_name":null,"is_branded_link":null,"af_status":"Non-organic","af_siteid":null,"ts":"1603747977","agency":null,"http_referrer":null,"af_cpi":null,"af_sub1":null,"campaign":"None","cost_cents_USD":"0","is_universal_link":null,"install_time":"2020-10-26 21:36:18.762","adgroup":null,"iscache":true,"af_sub5":null,"idfa":"F9728CFB-C26B-4C58-8530","af_click_lookback":"7d","af_r":"http:\/\/sdktest.appsflyer.com\/sdk-integration-test\/install\/launch?sid=f8fe61a7-c1e3-4592-8d4f","adset_id":null,"adgroup_id":null,"media_source":"appsflyer_sdk_test_int","clickid":"f8fe61a7-c1e3-4592-8d4f","engmnt_source":null,"af_sub4":null,"is_first_launch":false,"campaign_id":null,"redirect_response_data":null,"orig_cost":"0.0","match_type":"id_matching","af_sub3":null,"retargeting_conversion_type":"none"}
-> applicationWillResignActive()
-> applicationDidEnterBackground()
2020-10-29 17:29:31.905163-0400 Nodeshifter[4617:1787092] got didEnterBackground = (null)
["$s7Combine10PublishersO8SequenceV7receive10subscriberyqd___t7FailureQyd__Rs_AA10SubscriberRd__5InputQyd__7ElementRtzlF +752", "$s7Combine9PublisherPAAE9subscribeyyqd__AA10SubscriberRd__7FailureQyd__AFRtz5InputQyd__6OutputRtzlF +932", "CFRunLoopRunSpecific +572", "GSEventRunModal +160", "UIApplicationMain +164", "-[UnityFramework runUIApplicationMainWithArgc:argv:] +108", "main +68"]
["$s7Combine10PublishersO8SequenceV7receive10subscriberyqd___t7FailureQyd__Rs_AA10SubscriberRd__5InputQyd__7ElementRtzlF +752", "$s7Combine9PublisherPAAE9subscribeyyqd__AA10SubscriberRd__7FailureQyd__AFRtz5InputQyd__6OutputRtzlF +932", "CFRunLoopRunSpecific +572", "GSEventRunModal +160", "UIApplicationMain +164", "-[UnityFramework runUIApplicationMainWithArgc:argv:] +108", "main +68"]
FYI, this is what I get when I force a crash:
Causing a platform crash.
InvalidOperationException: Uncaught exception created from UI.
at LevelManager.ThrowUncaughtException () [0x00000] in <00000000000000000000000000000000>:0
at LevelManager.LoadLevel (System.String name) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
["$s7Combine10PublishersO8SequenceV7receive10subscriberyqd___t7FailureQyd__Rs_AA10SubscriberRd__5InputQyd__7ElementRtzlF +752", "$s7Combine9PublisherPAAE9subscribeyyqd__AA10SubscriberRd__7FailureQyd__AFRtz5InputQyd__6OutputRtzlF +932", "CFRunLoopRunSpecific +572", "GSEventRunModal +160", "UIApplicationMain +164", "-[UnityFramework runUIApplicationMainWithArgc:argv:] +108", "main +68"]
Just one question, It seems I've made it work on my iOS device following your instructions. But I don't seem to be able to make it work on Unity Editor. I guess it's not supported, is this correct?
Console: Disabling all app initializers Disable analytics Disable auth Disable crashlytics Disable database Disable dynamic_links Disable functions Disable instance_id Disable messaging Disable remote_config Disable storage Enable module 'analytics' for 'Firebase.Analytics.FirebaseAnalytics, Firebase.Analytics' analytics app initializer Enabling Enable module 'auth' for 'Firebase.Auth.FirebaseAuth, Firebase.Auth' auth app initializer Enabling crashlytics app initializer Disabling Enable module 'database' for 'Firebase.Database.FirebaseDatabase, Firebase.Database' database app initializer Enabling dynamic_links app initializer Disabling Enable module 'functions' for 'Firebase.Functions.FirebaseFunctions, Firebase.Functions' functions app initializer Enabling instance_id app initializer Disabling App initializer invites not found, failed to enable. messaging app initializer Disabling App initializer performance not found, failed to enable. remote_config app initializer Disabling Enable module 'storage' for 'Firebase.Storage.FirebaseStorage, Firebase.Storage' storage app initializer Enabling App initializer test_lab not found, failed to enable. Creating Firebase App __FIRAPP_DEFAULT for Firebase C++ 6.16.1 Added app name=__F (0x09faf6d0) Did not register exception handlers: Crashlytics SDK was not initialized Disabling all app initializers Disable analytics Disable auth Disable crashlytics Disable database Disable dynamic_links Disable functions Disable instance_id Disable messaging Disable remote_config Disable storage
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.
With the š, let me know if the issue is resolved.
With the š, let me know if the issue is resolved.
No, not for me. I added quite a bit more info on my last comment here https://github.com/firebase/quickstart-unity/issues/792#issuecomment-719038717
@jlubeck
I think I know what is going on here. The key is that you throw the exception within the continuation function of ContinueWithOnMainThread()
.
If any exception is thrown in the continuation function, the exception will be stored in the task it returns.
Try this:
public virtual void Start() {
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task => {
dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available) {
InitializeFirebase();
} else {
Debug.LogError(
"Could not resolve all Firebase dependencies: " + dependencyStatus);
}
}).ContinueWithOnMainThread(task => {
if (task.IsFaulted) {
Debug.LogException(task.Exception);
}
}).ContinueWith(task => {
Debug.LogWarning("Throw an exception from a non-main thread.");
throw new System.Exception("An exception from a non-main thread");
}).ContinueWithOnMainThread(task => {
if (task.IsFaulted) {
Debug.LogException(task.Exception);
}
});
}
We strongly recommend that you should do try-catch in continuation function since it usually behave differently in different version of Unity. I recall that, with earlier Unity versions, if you throw an exception in the continuation function of ContinueWith()
, the app may have hard crash or the thread would crash silently. I did not observed this behavior in Unity 2020 though.
Hope this answered your concern.
And please, do try our quickstart. Let us know if you cannot see the non-fatal error even using the quickstart.
Shawn
Hey @jlubeck. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
The problem is that I installed a new version of unity and my build system is broken. So I can't test anything until I fix that :( Please don't close this, I'll get back here as soon as I can
I'm not going to close the issue, but I'm going to change to needs-info for our issue tracking system.
Note: we are experiencing a similar issue, i am unable to get off the green crashlytics screen in the dashboard, it is still awaiting for events We're on 2020.1.17, FIrebase 7.00+ and installed via the package manager. No luck with either Android or iOS right now
We're using xcode 12.2 for ios, we had no issues on 6.15.2 and 2019.4 I've triple checked the googleinfo plist file and all good there. Follow the documentation steps thoroughly
The one thing that was wrong for iOS was the target membership in xcode was incorrect, it was set to unityframework and not the unity-iphone project, we've worked around it by changing our postprocessor but the app would crash on boot saying it couldn't find the plist file.
Other than that, with the debug log, we're getting the same, just says
DEBUG: App initializer crashlytics not found, failed to enable.
The usual code to check and fix passes fine.. var dependencyStatus = await Firebase.FirebaseApp.CheckAndFixDependenciesAsync(); if (dependencyStatus == Firebase.DependencyStatus.Available)
thnx
Hey @jlubeck. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
@simontgs I believe that postprocessor workaround is related to this https://github.com/firebase/quickstart-unity/issues/862#issuecomment-758893827
I just tried quickstart with 7.0.2
and I can see those events showing up a couple of minutes later. I did not use use_frameworks!
, empty Unity-iPhone
target and the post process though.
Could you describe a bit more about what your Xcode project looks like? Ex. Podfile, target membership you changed. Also, could you post the log from Xcode when you run quickstart? I actually did not see anything like DEBUG: App initializer crashlytics not found, failed to enable.
@jlubeck Any news?
Shawn
Just to add more info - installing firebase directly rather than via Unity package manager - crashlytics works as expected. I am still trying to get to the bottom of why it wont register when using it via the scoped registry.
@jlubeck
I think I know what is going on here. The key is that you throw the exception within the continuation function of
ContinueWithOnMainThread()
.If any exception is thrown in the continuation function, the exception will be stored in the task it returns.
Try this:
public virtual void Start() { FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task => { dependencyStatus = task.Result; if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }).ContinueWithOnMainThread(task => { if (task.IsFaulted) { Debug.LogException(task.Exception); } }).ContinueWith(task => { Debug.LogWarning("Throw an exception from a non-main thread."); throw new System.Exception("An exception from a non-main thread"); }).ContinueWithOnMainThread(task => { if (task.IsFaulted) { Debug.LogException(task.Exception); } }); }
We strongly recommend that you should do try-catch in continuation function since it usually behave differently in different version of Unity. I recall that, with earlier Unity versions, if you throw an exception in the continuation function of
ContinueWith()
, the app may have hard crash or the thread would crash silently. I did not observed this behavior in Unity 2020 though.Hope this answered your concern.
And please, do try our quickstart. Let us know if you cannot see the non-fatal error even using the quickstart.
Shawn
I just finally had time to try this, and I see the exceptions in my console but I still can't get past the green screen on Firebase console :(
@simontgs Thank you for verifying the unitypackage
version. This seems to be a different issue. Could you open a different issue and add a bit more detail about your situation?
@jlubeck If you use exactly the code I wrote, there won't be any Crashlytics event at all, since the code caught and handle everything already.
If you like to see Crashlytics event, try to replace Debug.LogException()
with Firebase.Crashlytics.Crashlytics.LogException()
.
As said, since anything thrown within a continuation function, ex. ContinueWith()
and ContinueWithOnMainThread()
, will be captured in the returned Task, Crashlyitcs would never able to detect it unless you explicitly report it. Crashlytics can only capture unhandled exceptions or app crashes.
Let us know. Shawn
Hey @jlubeck. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@jlubeck if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
[REQUIRED] Please fill in the following fields:
[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:
The i compiled the app and ran it on a physical device and these are my logs:
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?