Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firebase-perf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

* [fixed] Fix IllegalStateException when starting a trace before Firebase initializes.

# 21.0.1
* [fixed] Fixed an `ExceptionInInitializerError` where the `url.openStream()` causes a crash if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ private RemoteConfigManager() {
@VisibleForTesting
@SuppressWarnings("FirebaseUseExplicitDependencies")
static long getInitialStartupMillis() {
StartupTime startupTime = FirebaseApp.getInstance().get(StartupTime.class);
StartupTime startupTime = null;
try {
startupTime = FirebaseApp.getInstance().get(StartupTime.class);
} catch (IllegalStateException ex) {
// This can happen if you start a trace before Firebase is init
logger.debug("Unable to get StartupTime instance.");
}
if (startupTime != null) {
return startupTime.getEpochMillis();
} else {
Expand Down