question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Local firestore emulator webchannel configure not work

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 7.3.1

Platform: Linux(use Docker node:12.9.1-stretch image)

[REQUIRED] Test case

// firebase.json
{
  "firestore": {
    "rules": "firestore.rules"
  },
  "emulators": {
    "firestore": {
      "host": "0.0.0.0",
      "webchannel-port": 10055
    }
  }
}
$ npx firebase emulators:start --only firestore

[REQUIRED] Steps to reproduce

$ npm i firebase-tools

[REQUIRED] Expected behavior

root@8057431e08b7:/usr/src/app (master *)# npx firebase emulators:start --only firestore
firestore: Serving WebChannel traffic on at http://0.0.0.0:10055

  • host configuration
  • port configuration
  • webchannel host configuration
  • webchannel port configuration

is working. In particular, I want webchannel host 0.0.0.0.

[REQUIRED] Actual behavior

root@8057431e08b7:/usr/src/app (master *)# npx firebase emulators:start --only firestore --debug
[2019-09-05T20:57:30.281Z] ----------------------------------------------------------------------
[2019-09-05T20:57:30.293Z] Command:       /usr/local/bin/node /usr/src/app/node_modules/.bin/firebase emulators:start --only firestore --debug
[2019-09-05T20:57:30.295Z] CLI Version:   7.3.1
[2019-09-05T20:57:30.295Z] Platform:      linux
[2019-09-05T20:57:30.296Z] Node Version:  v12.9.1
[2019-09-05T20:57:30.298Z] Time:          Thu Sep 05 2019 20:57:30 GMT+0000 (Coordinated Universal Time)
[2019-09-05T20:57:30.298Z] ----------------------------------------------------------------------

i  Starting emulators: ["firestore"]
i  firestore: Serving WebChannel traffic on at http://0.0.0.0:8081
[2019-09-05T20:57:30.352Z] Ignoring unsupported arg: projectId
[2019-09-05T20:57:30.353Z] Ignoring unsupported arg: auto_download
[2019-09-05T20:57:30.355Z] Starting emulator firestore with command {"binary":"java","args":["-Duser.language=en","-jar","/root/.cache/firebase/emulators/cloud-firestore-emulator-v1.8.2.jar","--host","0.0.0.0","--port",8080,"--rules","/usr/src/app/firestore.rules","--webchannel_port",8081],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator"]}
i  firestore: Emulator logging to firestore-debug.log
[2019-09-05T20:57:33.244Z] API endpoint: http://0.0.0.0:8080

[2019-09-05T20:57:33.246Z] WebChannel endpoint: http://localhost:8081
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=0.0.0.0:8080

Dev App Server is now running.


✔  firestore: Emulator started at http://0.0.0.0:8080
i  firestore: For testing set FIRESTORE_EMULATOR_HOST=0.0.0.0:8080
✔  All emulators started, it is now safe to connect.

Probrem1. Host configure not work

cli display [2019-09-05T20:57:33.244Z] API endpoint: http://0.0.0.0:8080. But, log display [2019-09-05T20:57:33.246Z] WebChannel endpoint: http://localhost:8081.

Host is different!. And Host configure not work.

Probrem2. webchannel-port configure not work

or this feature does not exist?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanpbrewstercommented, Sep 5, 2019

Done, should go out with the next release. Thanks for filing this 😃

0reactions
ryanpbrewstercommented, Sep 5, 2019

Ah, gotcha, you want the webchannel traffic to inherit the normal hostname. Totally reasonable. I’ll plumb that through.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect to firebase emulator suite with exec
It runs successfully and gives me a path to connect to the functions and shows a local host url for firestore too. Then,...
Read more >
Install, configure and integrate Local Emulator Suite - Firebase
The Firebase Local Emulator Suite can be installed and configured for different prototype and test environments, anything from one-off prototyping sessions ...
Read more >
firebase@9.15.0 - jsDocs.io
firebase.firestore ... The service does not work with any other app. ... The current emulator configuration (or null).
Read more >
Release Notes | Google Cloud CLI Documentation
Added --local-nvme-ssd-block to gcloud beta container clusters create , gcloud beta container node-pools create ... Release Cloud Firestore emulator v1.15.1.
Read more >
How to tell Quasar to use Firebase emulator in dev mode
When I comment out the firebase.firestore.settings but leave ... server as indicated in the logs and doesn't trigger the function locally as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found