Skip to content

firestore emulator on wsl2 does not work, results in ERR_CONNECTION_REFUSED #332

Closed
firebase/firebase-tools
#2780
@bartlomiejborzucki

Description

The main discussion is here: firebase/firebase-tools#2334

REQUIRED] Environment info
firebase-tools:8.6.0

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

[NOT WORKING SOLUTION]

FYI, the fix for 0.0.0.0 went out with Firebase CLI v8.6.0. Please try that if you see issues with WSL with localhost / 127.0.0.1.

The above solution does not work

Summary:
Firebase emulator is running on wsl2 and we want to open firebase-tools-ui on the host machine.The page is loaded and everything works except the connection to the firestore backend. I use the following configuration:
"emulators": {
"firestore": {
"host": "0.0.0.0", // or host: 'localhost' or host: '127.0.0.1'
"port": "8080"
},
"ui": {
"enabled": true,
"port": 4000
}
}

Workaround:
Change host value to wsl2 ip address.

Screenshots:
firebase2
firebase

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions