Skip to content
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

Using Emulator UI remotely on a different device #340

Closed
emcfarlane opened this issue Aug 17, 2020 · 9 comments · Fixed by #592
Closed

Using Emulator UI remotely on a different device #340

emcfarlane opened this issue Aug 17, 2020 · 9 comments · Fixed by #592
Assignees

Comments

@emcfarlane
Copy link

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
        }
    }
@scottcrossen scottcrossen added the bug Something isn't working label Aug 17, 2020
@scottcrossen
Copy link

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.

@emcfarlane
Copy link
Author

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?

@emcfarlane emcfarlane changed the title Firebase Firestore UI doesn't show data Firebase Firestore UI doesn't proxy requests Aug 17, 2020
@yuchenshi
Copy link
Member

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.

@yuchenshi yuchenshi added feature request and removed bug Something isn't working labels Oct 23, 2020
@yuchenshi
Copy link
Member

Filed b/175127163 internally to track this.

@yuchenshi yuchenshi changed the title Firebase Firestore UI doesn't proxy requests Failed to connect to emulators when using Emulator UI remotely Feb 18, 2021
@vymarkov
Copy link

vymarkov commented Feb 22, 2021

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

@yuchenshi
Copy link
Member

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.

@yuchenshi yuchenshi self-assigned this Jul 9, 2021
@yuchenshi yuchenshi changed the title Failed to connect to emulators when using Emulator UI remotely Using Emulator UI remotely on a different device Aug 6, 2021
@yuchenshi yuchenshi pinned this issue Aug 6, 2021
@Ignaciojeria
Copy link

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

@motiejunas
Copy link

Does not work when running on Dev Container too.

@marcusx2
Copy link

marcusx2 commented Sep 8, 2023

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...

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

Successfully merging a pull request may close this issue.

7 participants