-
Notifications
You must be signed in to change notification settings - Fork 958
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
firestore emulator on wsl2 does not work, results in ERR_CONNECTION_REFUSED #2334
Comments
I see you're using |
@samtstern thanks for the reply, using http://localhost:4000/firestore results in the same ERR_CONNECTION_REFUSED error Might be relevant, I can access my app through localhost and my inet address through |
This one has stumped me. It seems like the error is occurring when the UI running on |
Emulators only listen to {
// ...
"emulators": {
"firestore": {"host": "0.0.0.0", "port": 8080},
"ui": {"host": "0.0.0.0", "port": 4000}
}
} And please let me know if visiting the Emulator UI through inet address works for you. If not, try also directly setting We have to admit that wsl2 is new territory to most of us here and we're also learning with you, so we really appreciate your help. |
Thanks @yuchenshi , setting the host to
|
As mentioned above, please try directly setting host to the inet address like |
Thank you @yuchenshi, setting host to the inet address like "firestore": {"host": "172.29.180.12", "port": 8080}, in firebase.json worked. I am able to edit the firestore through the UI. However, the issue with this setup is that inet addresses change frequently and it's not compatible between developers. |
I see two issues here:
Hopefully fixing 2. can give you a reasonable workaround, and we'd appreciate any help on root-causing or working around 1. |
I am going to close this in favor of firebase/firebase-tools-ui#286 since I doubt we can solve the WSL-specific issues with If that fix is released and we still have problems with no workaround we can re-open this discussion. |
I'm unable to connect to the emulator in any form when running from wsl2. None of the options for specifying the ip as the host worked. I can connect fine to the emulator UI but it can't connect either. This works the same when starting with a fresh project and an existing project. Emulator and UI work fine on my mac. |
FYI, the fix for |
It's not working. I have this configuration: |
@bartlomiejborzucki please open a new issue in the https://github.com/firebase/firebase-tools-ui repo with error messages from Firebase Emulator UI. For example, open Chrome DevTools on the UI (on the Firestore tab) and refresh to see what network requests fail and how. A screenshot can also be very helpful. |
@yuchenshi |
Hi all, let's move the discussion to firebase/firebase-tools-ui#332. I've done some Googling and summarized some workaround suggested by others at firebase/firebase-tools-ui#332 (comment) with next steps for troubleshooting. If this still affects you, make sure to check out the comments there and click the Subscribe button on that issue. |
Fixed in v8.15.1. See firebase/firebase-tools-ui#332 (comment) for details. |
try to set in config |
[REQUIRED] Environment info
firebase-tools:8.4.1
Platform: wsl2 with Ubuntu-18.04
[REQUIRED] Test case
Start emulator
firebase emulators:start --only firestore
Navigate to http://127.0.0.1:4000/firestore
Try to write in the database or simply check console
[REQUIRED] Steps to reproduce
Brand new project
firebase init
Select emulators and firestore
firebase init to get firestore files
firestore.rules
firestore.indexes.json
Follow test case above - go to url and write to database
[REQUIRED] Expected behavior
Should be able to write and read collection through emulator UI
[REQUIRED] Actual behavior
No changes are made to firestore, and receive error in console
Note: I tried this on mac and it worked fine
The text was updated successfully, but these errors were encountered: