Open
Description
Operating System
macOS 14.0
Browser Version
Chrome 120.0.6099.71 (Official Build) (arm64)
Firebase SDK Version
10.6.0
Firebase SDK Product:
Storage
Describe your project's tooling
rollup. Essentially bundles into HTML JS script.
Describe the problem
Every additional storage bucket used requires using connectStorageEmulator()
for each one. Otherwise, it will hit the live Storage bucket. Previously, this wasn't the case but I'm not sure when this behaviour changed.
I've observed this behaviour across web, ios and android Firebase SDKs. I can't see this documented anywhere. Was this intentional? Happy to close out if it was, but perhaps it should be documented.
Steps and code to reproduce issue
// Initialize Firebase
const app = initializeApp(config);
const storage = getStorage(app);
// connects to local emulator
connectStorageEmulator(storage, 'localhost', 9199);
// connects to live storage bucket unless you use connectStorageEmulator() again
const secondBucket = getStorage(app, 'gs://another-bucket.appspot.com');