Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions firebase-perf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Unreleased
* [fixed] Fix IllegalStateException when starting a trace before Firebase initializes.
* [changed] Updated protobuf dependency to `3.25.5` to fix
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).

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
Loading