-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use multiple RTDB instances with emulator #3681
Labels
Comments
Happy to do a PR which updates |
@rhodgkins thank you for filing such a detailed issue! Sorry nobody ever answered you at the time. I think you've diagnosed the problem correctly, I will put together a PR today based on your suggestion. |
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
When using multiple database instances (via
app.database(URL)
) with the firebase-tools emulator errors are thrown.Steps to reproduce:
Run the above code with just
node script.js
and the following is outputted with no errors:Now running against the DB emulator
firebase emulators:exec --project against-emulator --only database 'node script.js'
, errors occur:Relevant Code:
This is the bit of code throwing the error:
firebase-js-sdk/packages/database/src/core/RepoManager.ts
Lines 187 to 192 in 96076f0
It seems that
RepoInfo#toURLString
:firebase-js-sdk/packages/database/src/core/RepoInfo.ts
Lines 128 to 130 in 96076f0
Doesn't take into account the
namespace
of theRepoInfo
which the emulator uses to distinguish between different DB instances.The text was updated successfully, but these errors were encountered: