Skip to content

Emulator fails to start if functions port is specified, but functions were not initialized #2112

Closed

Description

@tstirrat

[REQUIRED] Environment info

firebase-tools: 8.0.2

Platform: Mac

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

$ firebase init
    # features: database, firestore, hosting
    # emulators: database, firestore, functions
$ cat firebase.json

{
  "database": {
    "rules": "database.rules.json"
  },
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
  "emulators": {
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "database": {
      "port": 9000
    }
  }
}
$ find . -type f | grep -v .git/
./firestore.rules
./firebase-debug.log
./.firebase/hosting.cHVibGlj.cache
./.firebaserc
./public/index.html
./.gitignore
./firebase.json
./database.rules.json
./firestore.indexes.json
$ firebase emulators:start

[REQUIRED] Expected behavior

It should boot ok

[REQUIRED] Actual behavior

[info] ✔  hub: emulator hub started at http://localhost:4400
[info] i  emulators: Shutting down emulators.
[info] i  hub: Stopping emulator hub
[debug] [2020-04-07T20:09:10.813Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:120:11)
    at Object.join (path.js:1039:7)
    at Object.<anonymous> (/Users/tstirrat/.npm-packages/lib/node_modules/firebase-tools/lib/emulator/controller.js:163:39)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/tstirrat/.npm-packages/lib/node_modules/firebase-tools/lib/emulator/controller.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Activity

  1. self-assigned this
    on Apr 7, 2020
  2. albertvp commented on Apr 23, 2020

    @albertvp

    #1915 (comment)

    [debug] [2020-04-23T11:41:02.396Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at validateString (internal/validators.js:121:11)
        at Object.join (path.js:1039:7)
        at Object.checkFunctionsSDKVersion [as fn] (/Users/maquinaire/.nvm/versions/node/v14.0.0/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:33:28)
        at Command.<anonymous> (/Users/maquinaire/.nvm/versions/node/v14.0.0/lib/node_modules/firebase-tools/lib/command.js:159:30)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions