firebase-tools serve makes an error
See original GitHub issue[REQUIRED] Environment info
**firebase-tools: 7.8.0 (the latest)
**Platform: macOS
[REQUIRED] Test case
firebase functions
project
functions index.js : exports.posts = functions.https.onRequest(require(‘./posts’)); exports.posts = functions.https.onRequest(require(‘./accounts’));
posts : index.js : const app = require(‘express’)(); const cors = require(‘cors’); app.use(cors({ origin: true })); app.get(‘/’, async (req, res) => { }); accounts: index.js : const app = require(‘express’)(); const cors = require(‘cors’); app.use(cors({ origin: true })); app.get(‘/’, async (req, res) => { });
[REQUIRED] Steps to reproduce
firebase functions + express get / post methods request multiple get requests, it makes errors. it is only made on firebase-tools 7.8.0. if I run the same codes on firebase-tools 7.7.0., it works fine.
[REQUIRED] Expected behavior
If I request multiple requests, it accepts well and perform.
[REQUIRED] Actual behavior
it makes an error
i functions: Beginning execution of "accounts"
[2019-11-19T10:17:42.957Z] [runtime-status] {"httpsTrigger":{},"name":"accounts","entryPoint":"accounts"}
[2019-11-19T10:17:42.957Z] [runtime-status] Running accounts in mode HTTPS {}
[2019-11-19T10:17:42.962Z] [functions] Runtime ready! Sending request!
[2019-11-19T10:17:42.968Z] [runtime-status] Ephemeral server used! {}
[2019-11-19T10:17:43.003Z] [runtime-status] Ephemeral server survived. {}
[2019-11-19T10:17:43.339Z] Accepted request OPTIONS /~/posts/rT7UgEMG8KhTlLOADE3y/comments --> posts
[2019-11-19T10:17:43.339Z] [worker-posts-3a43686e-d66c-4835-a45e-b4be49366232]: Assigning socketPath: /var/folders/zp/903b9f055r1czvjktw3fg_7r0000gn/T/firebase_emulator_invocation_3a43686e-d66c-4835-a45e-b4be49366232.sock
[2019-11-19T10:17:43.339Z] [worker-posts-3a43686e-d66c-4835-a45e-b4be49366232]: BUSY
[2019-11-19T10:17:43.339Z] [runtime-status] Trigger "posts" has been found, beginning invocation! {}
i functions: Beginning execution of "posts"
[2019-11-19T10:17:43.340Z] [runtime-status] {"httpsTrigger":{},"name":"posts","entryPoint":"posts"}
[2019-11-19T10:17:43.340Z] [runtime-status] Running posts in mode HTTPS {}
> events.js:174
> throw er; // Unhandled 'error' event
> ^
>
> Error: listen EADDRINUSE: address already in use /var/folders/zp/903b9f055r1czvjktw3fg_7r0000gn/T/firebase_emulator_invocation_3a43686e-d66c-4835-a45e-b4be49366232.sock
> at Server.setupListenHandle [as _listen2] (net.js:1263:19)
> at listenInCluster (net.js:1328:12)
> at Server.listen (net.js:1426:5)
> at Function.listen (/Users/mmj/.npm-global/lib/node_modules/firebase-tools/node_modules/express/lib/application.js:618:24)
> at Promise (/Users/mmj/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:563:46)
> at new Promise (<anonymous>)
> at /Users/mmj/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:528:15
> at Generator.next (<anonymous>)
> at /Users/mmj/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:7:71
> at new Promise (<anonymous>)
> Emitted 'error' event at:
> at emitErrorNT (net.js:1307:8)
> at process._tickCallback (internal/process/next_tick.js:63:19)
[2019-11-19T10:17:43.352Z] [worker-posts-3a43686e-d66c-4835-a45e-b4be49366232]: exited
[2019-11-19T10:17:43.353Z] [worker-posts-3a43686e-d66c-4835-a45e-b4be49366232]: FINISHED
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
For everyone affected by this: version
7.8.1
was just released!@samtstern Thank you for your fast release! @richard-mckenna Me too, I eased every code I had written when I face it. ha ha. I am using Vue too 😃