Skip to content

Fix/issue 1629 auth emulator log spam - #1894

Draft
AustinBenoit wants to merge 9 commits into
mainfrom
fix/issue-1629-auth-emulator-log-spam
Draft

Fix/issue 1629 auth emulator log spam#1894
AustinBenoit wants to merge 9 commits into
mainfrom
fix/issue-1629-auth-emulator-log-spam

Conversation

@AustinBenoit

Copy link
Copy Markdown
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

Fixed log spam and high CPU utilization when offline by moving USE_AUTH_EMULATOR environment variable check to initialization and eliminating per-request logging (#1629)


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Locally test to make sure auth emulator can still be reached. Along with making sure no env variable still talks with prod.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

Fixes Bugs:
#1629

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Auth Emulator initialization on Desktop by moving the environment variable checks (USE_AUTH_EMULATOR and AUTH_EMULATOR_PORT) from per-request checks in AuthRequest to a one-time initialization in CreatePlatformAuth, addressing issues with log spam and high CPU utilization. The feedback suggests optimizing the environment variable lookup for AUTH_EMULATOR_PORT to avoid redundant calls to std::getenv and to handle empty port strings safely.

Comment thread auth/src/desktop/auth_desktop.cc
@AustinBenoit
AustinBenoit requested a review from a-maurice July 29, 2026 16:16
@AustinBenoit
AustinBenoit removed the request for review from a-maurice July 29, 2026 16:20
@AustinBenoit
AustinBenoit marked this pull request as draft July 29, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant