Skip to content

[cloud_firestore_web] PersistentMultipleTabManager (multi-tab sync) not exposed in Settings #17921

@muriloventuroso

Description

@muriloventuroso

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

No response

Which platforms are affected?

No response

Description

Bug report

Describe the bug

The PersistentMultipleTabManager for multi-tab synchronization on Flutter Web is available in the JS interop layer but is not exposed through the public Settings API.

Looking at the source code in cloud_firestore_web-5.1.0:

The interop layer has full support (lib/src/interop/firestore_interop.dart):

@JS()
@staticInterop
external PersistentLocalCache persistentLocalCache(
  PersistentCacheSettings settings,
);

...

@anonymous
@JS()
@staticInterop
abstract class PersistentCacheSettings {
  external factory PersistentCacheSettings({
    JSNumber? cacheSizeBytes,
    JSObject? tabManager,
  });
}

But the settings setter doesn't use it (lib/cloud_firestore_web.dart:):

localCache = firestore_interop
    .persistentLocalCache(firestore_interop.PersistentCacheSettings(
  cacheSizeBytes: firestoreSettings.cacheSizeBytes?.toJS,
  // tabManager is NOT passed here!
));

Reproducing the issue

  1. Try to enable multi-tab persistence on Flutter Web
  2. The old enablePersistence(PersistenceSettings(synchronizeTabs: true)) method was removed
  3. There's no way to pass tabManager through the current Settings class

Firebase Core version

4.3.0

Flutter Version

3.38.4

Relevant Log Output

Flutter dependencies

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

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs AttentionThis issue needs maintainer attention.type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions