-
Notifications
You must be signed in to change notification settings - Fork 993
Open
Labels
Description
Operating System
macOS Sequoia
Environment (if applicable)
Chrome
Firebase SDK Version
12.6.0
Firebase SDK Product(s)
Remote-Config
Project Tooling
none.
(I use flutter firebase lib for flutter web and noticed this behavior: firebase/flutterfire#17901 )
Detailed Problem Description
onConfigUpdated with error handler emits the following error repeatedly when the page becomes hidden (e.g. switching tabs or minimizing the browser window):
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).
at RealtimeHandler.prepareAndBeginRealtimeHttpStream (realtime_handler.ts:633:35)
Since the SDK already tracks background state via isInBackground, would it make sense to guard this else block as well?
Steps and code to reproduce issue
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js"
import { getRemoteConfig, onConfigUpdate } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-remote-config.js"
const firebaseConfig = {
// config
};
const app = initializeApp(firebaseConfig);
const remoteConfig = getRemoteConfig(app);
onConfigUpdate(remoteConfig, {
next: (configUpdate) => {
console.log("Updated keys:", configUpdate.getUpdatedKeys());
},
error: (error) => {
console.error(error);
},
complete: () => {
console.log("Listening stopped.");
}
});- Load js
- Switch tab
Terenfear