firebase-tools: Emulator socket fails on Windows with EACCES

[REQUIRED] Environment info

**firebase-tools:**6.9.2

**Platform:**Windows

[REQUIRED] Test case

With 6.9.2 I try to emulate functions locally and get this whenever I call a function:

`! Your requested “node” version “8” doesn’t match your global version “10”

events.js:174 throw er; // Unhandled ‘error’ event ^

Error: listen EACCES: permission denied C:\Users\Work\AppData\Local\Temp\firebase_emulator_invocation_10596.sock at Server.setupListenHandle [as _listen2] (net.js:1253:19) at listenInCluster (net.js:1318:12) at Server.listen (net.js:1416:5) at Function.listen (C:\Users\Work\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\express\lib\application.js:618:24) at Promise (C:\Users\Work\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:359:46) at new Promise (<anonymous>) at C:\Users\Work\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:332:15 at Generator.next (<anonymous>) at C:\Users\Work\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:7:71 at new Promise (<anonymous>) Emitted ‘error’ event at: at emitErrorNT (net.js:1297:8) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:757:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)`

This behaviour was not present in 6.8.0 and I just verified that 6.8.0 works.

I even reinstalled Windows to double check (don’t worry, it was time to do it anyway).

Note that I’m running firebase tools as the administrator, so not sure where the permission denied error is coming from.

Also note that when I run a basic express server:

`const express = require(‘express’) const app = express() const port = “c:\temp\f.sock”

app.get(‘/’, (req, res) => res.send(‘Hello World!’))

app.listen(port, () => console.log(Example app listening on port ${port}!))`

I get the same error.

[REQUIRED] Steps to reproduce

  1. Install firebase tools@6.9.2
  2. Init a new project with just functions
  3. Uncomment the helloWorld function example
  4. Emulate the function locally with firebase serve command
  5. Call the localhost function url
  6. Notice the crash

[REQUIRED] Expected behavior

The function should run.

[REQUIRED] Actual behavior

The function crashes.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Fix for this has been merged and will be included in the next release.

Thanks for the report @jkarst, looks like we’ve got a handful of Windows-exclusive issues. I’ll dive into issues on there specifically today. Sorry for the inconvience, in the meantime feel free to npm install -g firebase-tools@6.8.0 to roll back to the old emulator.

Alright, I’ve found a fix for this and will hopefully get it in for the 6.9.3 release this week!

Seeing the same issue. @epomatti how do you revert?

@brendanosborne run npm install -g firebase-tools@6.8.0… all of 6.9.x releases are broken in some way until now, you have to go 6.8.0.

Thanks. Spent many hours on this, thinking it was my fault.

Thanks @epomatti and @ryanmeier - I’m back in business until this is resolved.