Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openStream should not be intercepted if Firebase Perf is not initialized #5616

Closed
wants to merge 5 commits into from
Closed

Conversation

argzdev
Copy link
Contributor

@argzdev argzdev commented Dec 27, 2023

Proposed fix for #5584:

Issue

Crash happens if a URL connection is opened e.g. url.openStream() when TransportManager has not been initialized.

Investigation

  1. openStream in FirebasePerfUrlConnection intercepts all urls that opens connections.
  2. openStream requires TransportManager to be initialized
  3. TransportManager is only initialized after FirebasePerformance has been initialized

Solution

If TransportManager is not initialized, we should simply return the URL openStream and not intercept the connection.

Copy link
Contributor

@visumickey visumickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good to me.

But this issue needs a more broader look to see if we can capture these network requests as well (may be initialize Transport Manager early). But that is a bigger refactor. So, this change looks good for now.

@argzdev
Copy link
Contributor Author

argzdev commented Jan 12, 2024

PR seems to be failing due to:

  • App Distribution release notes needed (not sure why this is being triggered)
  • firebase-sessions:test-app:copyRootGoogleServices failing to copy the file which causes the task for :firebase-sessions:test-app:processDebugGoogleServices return a Malformed root json error.

@argzdev argzdev closed this by deleting the head repository Mar 15, 2024
@firebase firebase locked and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants