Open j1mmie opened 7 months ago
Update: Found a workaround
I had previously installed firebase-tools via the provided curl snippet (curl -sL firebase.tools | bash
). I uninstalled that copy of firebase-tools (rm -fr /usr/local/bin/firebase
) and reinstalled via NPM (npm install -g firebase-tools
) and things are working again.
I'll leave this issue open and let the firebase team decide whether it's a bug in the curl install process, or maybe just an outlier. Thanks all
Hey @j1mmie, thanks for the detailed report and for sharing your observations. I was able to reproduce this, and as you mentioned, it does seem like the issue is only reproducible when firebase-tools
is downloaded via curl -sL firebase.tools | bash
. Installing it via NPM works fine.
Let me try to bring someone from our team to take a look into this.
Hey @j1mmie, glad that you found a workaround. Installs through firebase.tools do some dark magic in order to bundle node/npm alongside firebase-tools, which can cause some weirdness for parts of the codebase that call node directly. The functions emulator happens to do that, so I'm not shocked that it behaves incorrectly here.
I'll dig into this a bit to see if there is an easy fix - however, I'm hoping to replace that dark magic using single executable applications (https://nodejs.org/api/single-executable-applications.html) at some point, which will hopefully make this bug obsolete.
Great to hear, I'm glad I reported it then, thanks all.
[REQUIRED] Environment info
firebase-tools: 13.0.3 node: v18.19.0
Platform: macOS 14.2.1 (23C71)
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Firebase emulator should open port 9229 for connections and allow debuggers (like VSCode) to connect.
[REQUIRED] Actual behavior
Connecting via VSCode with the following launch.json configuration fails. The "connecting" panel shows for a few seconds then disappears without any error message.
Telnet to port 9229 fails:
lsof (on macOS) shows no open sockets on port 9229: