We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 996acd8 commit 2ccdeb1Copy full SHA for 2ccdeb1
firebase-perf/src/main/java/com/google/firebase/perf/config/RemoteConfigManager.java
@@ -88,7 +88,13 @@ private RemoteConfigManager() {
88
@VisibleForTesting
89
@SuppressWarnings("FirebaseUseExplicitDependencies")
90
static long getInitialStartupMillis() {
91
- StartupTime startupTime = FirebaseApp.getInstance().get(StartupTime.class);
+ 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
+ }
98
if (startupTime != null) {
99
return startupTime.getEpochMillis();
100
} else {
0 commit comments