Skip to content

[firebase_remote_config]: onConfigUpdated emits errors when window is hidden or minimized #17901

@noze12

Description

@noze12

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Remote Config

Which platforms are affected?

Web

Description

On Flutter Web using onConfigUpdated, following error is emitted when the browser is minimized or when switching macOS Spaces:

FirebaseError: Remote Config: The stream was not able to connect to the backend: Unable to connect to the server. HTTP status code: undefined. (remoteconfig/stream-error)

Reproducing the issue

  1. use onConfigUpdated
FirebaseRemoteConfig.instance.onConfigUpdated.listen(
 (event) async {
    await remoteConfig.activate();
    ...
 },
 onError: (e, st) {
   debugPrint(e.toString());
 },
)
  1. start app in chrome
  2. Trigger typical user actions such as:
    • Switch to another macOS Space
    • Minimize the browser window using the “–” button (Dock)

Firebase Core version

4.2.1

Flutter Version

3.32.0

Relevant Log Output

FirebaseError: Remote Config: The stream was not able to connect to the backend: Unable to connect to the server. HTTP status code: undefined. (remoteconfig/stream-error)

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

Remote Config itself works correctly (fetch/activate and real time change succeeds and values are applied as expected), but this error appears very often and makes the console noisy.

I understand that the stream might fail when the tab/window is backgrounded, but I would expect the SDK to handle this more gracefully, or at least provide an easier way to filter it out on the Dart side.

If you consider this more of a feature request (log behavior change), please feel free to retag.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions