File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/java/com/google/firebase/perf/config Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11# Unreleased
2+ * [ fixed] Fix IllegalStateException when starting a trace before Firebase initializes.
23* [ changed] Updated protobuf dependency to ` 3.25.5 ` to fix
34 [ CVE-2024 -7254] ( https://github.com/advisories/GHSA-735f-pc8j-v9w8 ) .
45
Original file line number Diff line number Diff line change @@ -88,7 +88,13 @@ private RemoteConfigManager() {
8888 @ VisibleForTesting
8989 @ SuppressWarnings ("FirebaseUseExplicitDependencies" )
9090 static long getInitialStartupMillis () {
91- StartupTime startupTime = FirebaseApp .getInstance ().get (StartupTime .class );
91+ StartupTime startupTime = null ;
92+ try {
93+ startupTime = FirebaseApp .getInstance ().get (StartupTime .class );
94+ } catch (IllegalStateException ex ) {
95+ // This can happen if you start a trace before Firebase is init
96+ logger .debug ("Unable to get StartupTime instance." );
97+ }
9298 if (startupTime != null ) {
9399 return startupTime .getEpochMillis ();
94100 } else {
You can’t perform that action at this time.
0 commit comments