firebase / firebase/firebase-tools

It seems that you are running multiple instances of the emulator suite for project <project-name>. This may result in unexpected behavior

Open
#3,616 7 comments 0 reactions 1 assignee Assigned to @christhompsongoogle View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools: 9.16.0**

**Platform: Windows 10 21H1*

### [REQUIRED] Steps to reproduce

Start the emulators, press CTRL + C and wait for it to say shut down. Start it back up and look for the below message:

> ! emulators: It seems that you are running multiple instances of the emulator suite for project plant-order-form. This may result in unexpected behavior.

### [REQUIRED] Expected behavior

The emulators shut down cleanly everytime

### [REQUIRED] Actual behavior

It seems that the emulators don't cleanup properly

Some additional notes:
- I work on multiple Firebase projects on my machine. Each time I start up the emulator, it starts it for all the projects I've worked on so far
- Whenever I close the emulators with CTRL+C two terminals are still left open (see images below). I always have to manually close them for the emulator to restart successfully
- Perhaps a different problem entirely, it doesn't export to the folder it derived the import from. It'll read in from `./mock` but always fail to export and dump the export at my project root(see third image)

These are by no means critical problems, just really inconvenient. I always have to look at what port the emulator is started on to make sure I'm looking at the correct UI.

![image](https://user-images.githubusercontent.com/71771821/127496519-e36ce217-e2ec-415d-a722-d0f7f6d13f9c.png)
![image](https://user-images.githubusercontent.com/71771821/127496563-98f15693-4699-436d-8336-94432cb77e1a.png)

Random firebase export:
![image](https://user-images.githubusercontent.com/71771821/127496614-e643d9de-89aa-4458-90f5-93df64e92336.png)

```
PS C:\Users\simeon.ramjit\Documents\projects\plant-order-form> firebase emulators:start --import=./mock --export-on-exit
i emulators: Starting emulators: functions,
firestore, pubsub, storage
! emulators: It seems that you are running multiple instances of the emulator suite for project plant-order-form. This may result in unexpected behavior.
! functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, database, hosting
+ functions: Using node@14 from host.
i firestore: Importing data from C:\Users\simeon.ramjit\Documents\projects\plant-order-form\mock\firestore_export\firestore_export.overall_export_metadata
i firestore: Firestore Emulator logging to firestore-debug.log
i pubsub: Pub/Sub Emulator logging to pubsub-debug.log
! ui: Emulator UI unable to start on port 4000, starting on 4017 instead.
i ui: Emulator UI logging to ui-debug.log
i functions: Watching "C:\Users\simeon.ramjit\Documents\projects\plant-order-form\functions" for Cloud Functions...
+ functions[us-central1-changeUserAuthorization]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changeUserAuthorization).
+ functions[us-central1-createUser]: http function initialized (http://localhost:5001/plant-order-form/us-central1/createUser).
+ functions[us-central1-deleteUser]: http function initialized (http://localhost:5001/plant-order-form/us-central1/deleteUser).
+ functions[us-central1-downloadFullItemReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadFullItemReq).
+ functions[us-central1-downloadReqsSplit]:
http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadReqsSplit).
+ functions[us-central1-sendRepeatOrderStatusChangeEmail]: firestore function initialized.
+ functions[us-central1-stripItemCodeFromItemUpload]: firestore function initialized.
+ functions[us-central1-sendEmailReciept]: firestore function initialized.
+ functions[us-central1-updateItemDatabase]: storage function initialized.
+ functions[us-central1-scheduledFirestoreExport]: pubsub function initialized.
+ functions[us-central1-firestoreImport]: http function initialized (http://localhost:5001/plant-order-form/us-central1/firestoreImport).
+ functions[us-central1-updateBlynkSevenC]:
http function initialized (http://localhost:5001/plant-order-form/us-central1/updateBlynkSevenC).
+ functions[us-central1-updateBlynkNineC]: http function initialized (http://localhost:5001/plant-order-form/us-central1/updateBlynkNineC).
+ functions[us-central1-updateMachineStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/updateMachineStatus).
+ functions[us-central1-resetConversionMachineOrderDetails]: http function initialized (http://localhost:5001/plant-order-form/us-central1/resetConversionMachineOrderDetails).
+ functions[us-central1-updateTimeStatusChanged]: http function initialized (http://localhost:5001/plant-order-form/us-central1/updateTimeStatusChanged).
+ functions[us-central1-sendSixAmOrderSummary]: pubsub function initialized.
+ functions[us-central1-sendTwelvePmOrderSummary]: pubsub function initialized.
+ functions[us-central1-downloadBatchRequisition]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadBatchRequisition).
+ functions[us-central1-stripBatchNumber]: firestore function initialized.
+ functions[us-central1-sendOrderScheduledSummary]: pubsub function initialized.
+ functions[us-central1-updateBlynkExtrusion]: firestore function initialized.
+ functions[us-central1-downloadBtReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadBtReq).
+ functions[us-central1-sendScheduledBatchConfirmation]: pubsub function initialized.
+ functions[us-central1-updateMouldingItemDatabase]: storage function initialized.
+ functions[us-central1-sendMouldingSlackMessage]: firestore function initialized.
+ functions[us-central1-sendDailyMouldingProductionUpdate]: http function initialized (http://localhost:5001/plant-order-form/us-central1/sendDailyMouldingProductionUpdate).
+ functions[us-central1-uploadPriceList]: storage function initialized.
+ functions[us-central1-addExtBatchPriority]: firestore function initialized.
+ functions[us-central1-addPrtBatchPriority]: firestore function initialized.
+ functions[us-central1-addLamBatchPriority]: firestore function initialized.
+ functions[us-central1-addSltBatchPriority]: firestore function initialized.
+ functions[us-central1-addConBatchPriority]: firestore function initialized.
+ functions[us-central1-decrementExtBatchCount]: firestore function initialized.
+ functions[us-central1-decrementPrtBatchCount]: firestore function initialized.
+ functions[us-central1-decrementLamBatchCount]: firestore function initialized.
+ functions[us-central1-decrementExtrusionBatchCount]: firestore function initialized.
+ functions[us-central1-decrementConBatchCount]: firestore function initialized.
+ functions[us-central1-swapExtBatchPriority]: http function initialized (http://localhost:5001/plant-order-form/us-central1/swapExtBatchPriority).
+ functions[us-central1-swapPrtBatchPriority]: http function initialized (http://localhost:5001/plant-order-form/us-central1/swapPrtBatchPriority).
+ functions[us-central1-swapLamBatchPriority]: http function initialized (http://localhost:5001/plant-order-form/us-central1/swapLamBatchPriority).
+ functions[us-central1-swapSltBatchPriority]: http function initialized (http://localhost:5001/plant-order-form/us-central1/swapSltBatchPriority).
+ functions[us-central1-swapConBatchPriority]: http function initialized (http://localhost:5001/plant-order-form/us-central1/swapConBatchPriority).
+ functions[us-central1-changeExtBatchStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changeExtBatchStatus).
+ functions[us-central1-changePrtBatchStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changePrtBatchStatus).
+ functions[us-central1-changeLamBatchStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changeLamBatchStatus).
+ functions[us-central1-changeSltBatchStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changeSltBatchStatus).
+ functions[us-central1-changeConBatchStatus]: http function initialized (http://localhost:5001/plant-order-form/us-central1/changeConBatchStatus).
+ functions[us-central1-downloadExtBatchReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadExtBatchReq).
+ functions[us-central1-downloadConBatchReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadConBatchReq).
+ functions[us-central1-downloadPrtBatchReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadPrtBatchReq).
+ functions[us-central1-downloadSltBatchReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadSltBatchReq).
+ functions[us-central1-downloadLamBatchReq]: http function initialized (http://localhost:5001/plant-order-form/us-central1/downloadLamBatchReq).
+ functions[us-central1-masterBatchDelete]:
firestore function initialized.
+ functions[us-central1-deleteOrderAndInformation]: http function initialized (http://localhost:5001/plant-order-form/us-central1/deleteOrderAndInformation).
+ functions[us-central1-addItem]: firestore
function initialized.
+ functions[us-central1-sendAckSlackBtReq]:
http function initialized (http://localhost:5001/plant-order-form/us-central1/sendAckSlackBtReq).
+ functions[us-central1-subscribeSlackBtReq]: pubsub function initialized.
+ functions[us-central1-sendSlackOrderComplete]: firestore function initialized.
+ functions[us-central1-sendSlackOrderQualityComplete]: firestore function initialized.
+ functions[us-central1-getInProgressBatches]: http function initialized (http://localhost:5001/plant-order-form/us-central1/getInProgressBatches).
+ functions[us-central1-subscribeToNotificationTopic]: http function initialized (http://localhost:5001/plant-order-form/us-central1/subscribeToNotificationTopic).
+ functions[us-central1-unsubscribeFromNotificationTopic]: http function initialized (http://localhost:5001/plant-order-form/us-central1/unsubscribeFromNotificationTopic).
+ functions[us-central1-sendNotif]: http function initialized (http://localhost:5001/plant-order-form/us-central1/sendNotif).
+ functions[us-central1-uploadQualityCharacteristics]: storage function initialized.

┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
│ i View Emulator UI at http://localhost:4017 │
└─────────────────────────────────────────────────────────────┘

┌───────────┬────────────────┬─────────────────────────────────┐
│ Emulator │ Host:Port │ View in Emulator UI │
├───────────┼────────────────┼─────────────────────────────────┤
│ Functions │ localhost:5001 │ http://localhost:4017/functions │
├───────────┼────────────────┼─────────────────────────────────┤
│ Firestore │ localhost:8080 │ http://localhost:4017/firestore │
├───────────┼────────────────┼─────────────────────────────────┤
│ Pub/Sub │ localhost:8085 │ n/a

├───────────┼────────────────┼─────────────────────────────────┤
│ Storage │ localhost:9199 │ http://localhost:4017/storage │
└───────────┴────────────────┴─────────────────────────────────┘
Emulator Hub running at localhost:4400
Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.

i functions: Beginning execution of "us-central1-getInProgressBatches"
i functions: Finished "us-central1-getInProgressBatches" in ~1s
i functions: Beginning execution of "us-central1-getInProgressBatches"
> {"verifications":{"app":"MISSING","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"}
i functions: Finished "us-central1-getInProgressBatches" in ~1s
i functions: Beginning execution of "us-central1-updateItemDatabase"
i functions: Finished "us-central1-updateItemDatabase" in ~1s
i functions: Beginning execution of "us-central1-updateMouldingItemDatabase"
i functions: Finished "us-central1-updateMouldingItemDatabase" in ~1s
i functions: Beginning execution of "us-central1-uploadPriceList"
i functions: Finished "us-central1-uploadPriceList" in ~1s
i functions: Beginning execution of "us-central1-uploadQualityCharacteristics"
i functions: Finished "us-central1-uploadQualityCharacteristics" in ~1s

i emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown.
i emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now.
i Automatically exporting data using --export-on-exit "./mock" please wait for the export to finish...

Error: Storage Emulator Rules runtime exited
unexpectedly.
i Found running emulator hub for project plant-order-form at http://localhost:4400
i Exporting data to: C:\Users\simeon.ramjit\Documents\projects\plant-order-form\mock
i emulators: Received export request. Exporting data to C:\Users\simeon.ramjit\Documents\projects\plant-order-form\mock.
PS C:\Users\simeon.ramjit\Documents\projects\plant-order-form>
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.