firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Make emulator hub locator path more robust to environment changes

Open tammam-g opened this issue 6 months ago • 3 comments

Description

Some clients couldn't discover emulator due to tempdir path being different depending the client, by using ~/.cache/firebase we should have more robust path.

Scenarios Tested

Running dataconnect emulator Running dataconnect MCP and communicating with emulator from previously failing client (RooCode)

Sample Commands

image

tammam-g avatar May 15 '25 22:05 tammam-g

Does this file get cleaned up after you kill the emulator? If not, I'm worried that all subsequent runs will see a running emualtor

Just tested it and it does cleanup, works same exact way as the previous one worked.

tammam-g avatar May 15 '25 22:05 tammam-g

Does this file get cleaned up after you kill the emulator? If not, I'm worried that all subsequent runs will see a running emualtor

The EmulatorHubClient is just a HTTP client that tries to reach the emulator.

Not something that consumes a lot of resource, right?

fredzqm avatar May 15 '25 22:05 fredzqm

@joehan @yuchenshi

Can you take a look at this small but risky change?

It sounds like some MCP client sets the $TMPDIR and messed up CLI's resolution algorithm. @tammam-g is trying to move the locator file to a fixed path.

fredzqm avatar May 28 '25 20:05 fredzqm