firebase/firebase-tools-ui

Using Emulator UI remotely on a different device

emcfarlane opened this issue · 9 comments

Viewing the firestore UI is always empty. My tests are passing and successfully using firestore. Creating a collection with a document in the UI returns to a empty database UI. Navigating to the collection via the URL returns an empty collection.

IMG_0100
IMG_0101

I'm on version 8.7.0 of firebase cli. Starting the emulators with firestore emulators:start.

Config:

    "firestore": {
        "rules": "firestore.rules"
    },
    "emulators": {
        "hosting": {
            "port": 5000
        },
        "firestore": {
            "port": "8080"
        },
        "ui": {
            "enabled": true,
            "host": "0.0.0.0",
            "port": 4000
        }
    }

Hi! Are there any errors in your chrome developer console? Are there any errors from your CLI output? I am unable to reproduce such a specific case.

Hello! My setup was odd as I was on a mobile device and couldn't check the output. Back on a laptop. Its failing to resolve the localhost address as I'm accessing the UI remotely. Is there support for proxying the requests?

Hello! My setup was odd as I was on a mobile device and couldn't check the output. Back on a laptop. Its failing to resolve the localhost address as I'm accessing the UI remotely. Is there support for proxying the requests?

I've raised this in an internal discussion and we're brainstorming on early ideas on supporting using the Emulator UI from another device. We'll get back to you once we have a better proposal. For now though, sorry, that's not (yet) a supported setup.

Filed b/175127163 internally to track this.

Would be nice to have this feature to be able use GitPod

As of Firebase CLI v9.15.1 (just released), we now support limited use of Emulator UI on a different device. (Note that Emulator UI layout may not be optimal on devices with smaller screens such as mobile.)

Note that in addition to the UI, you'll also need to set any emulator you want to view plus logging and hub to listen on 0.0.0.0 (or you will run into #423).

  "emulators": {
    "database": {
      "host": "0.0.0.0"
    },
    "firestore": {
      "host": "0.0.0.0"
    },
    "hosting": {
      "host": "0.0.0.0"
    },
    "storage": {
      "host": "0.0.0.0"
    },
    "auth": {
      "host": "0.0.0.0"
    },
    "ui": {
      "host": "0.0.0.0"
    },
    "logging": {
      "host": "0.0.0.0"
    },
    "hub": {
      "host": "0.0.0.0"
    }
  }

Warning as usual: this may make the emulators available to everyone on the same LAN (or worse, the whole internet). Quick reminder not to put in real credentials or private information. Firebase Emulator Suite is not secure and should never be used as a self-hosted version of Firebase.

Does anyone have any clues to be able to use the emulator on gitpod?

Does not work when running on Dev Container too.

As of Firebase CLI v9.15.1 (just released), we now support limited use of Emulator UI on a different device. (Note that Emulator UI layout may not be optimal on devices with smaller screens such as mobile.)

Note that in addition to the UI, you'll also need to set any emulator you want to view plus logging and hub to listen on 0.0.0.0 (or you will run into #423).

Already did all of this, I still get "The site can't be reached" when trying to view the emulator UI on Android chrome. I'm having the same problem as #912. I'm using the latest firebase cli...