firebase / firebase-tools

The Firebase Command Line Tools
MIT License
3.99k stars 921 forks source link

PubSub Emulator on Windows launches a Java window #3506

Open hatboysam opened 3 years ago

hatboysam commented 3 years ago

[REQUIRED] Environment info

firebase-tools: 9.3.0

Platform: WIndows 10

[REQUIRED] Test case

I've been using the Firestore, Functions, and Hosting emulators for ~1 year now. Today I added a PubSub function which means I had to start using the pubsub emulator.

For some reason when I do emulators:start the PubSub emulator launches in a new window: image

This doesn't affect any of the functionality except that when I do Ctrl^C to close the emulators:start process it does not close the PubSub emulator. I have to manually click to close that window in order to free up the port.

[REQUIRED] Steps to reproduce

As far as I can tell, just launching the PubSub emulator on Windows.

[REQUIRED] Expected behavior

PubSub emulator runs as an invisible subprocess just like Functions, Firestore, etc.

[REQUIRED] Actual behavior

See above.

samtstern commented 3 years ago

I think this is because we use .bat script instead of just using the JAR: https://github.com/firebase/firebase-tools/blob/7c08e42e7cf09ab6ab17f29d2200cd103ed8e962/src/emulator/downloadableEmulators.ts#L86

I wonder if there's a good reason we can't use the JAR directly?

markgoho commented 2 years ago

I'm on Windows 11, and when starting the emulators npx firebase emulators:start it opens the Java window. When I stop the emulator, the window persists and doesn't appear to shut anything down. And when I try to start them back up, it fails.

image image

after stopping emulators, when trying to restart: image

ShanArosh commented 1 year ago

Any Updates on this.