Skip to content

database:update is broken in 8.16 (Works with 8.15.1) #2814

@ChetanGoti

Description

@ChetanGoti

[REQUIRED] Environment info

firebase-tools:
8.16.0

Platform:
macOS

[REQUIRED] Test case

`firebase database:set throws error with v8.16.0

[REQUIRED] Steps to reproduce

firebase database:update --token MY_TOKEN --project MY_PROJECT  /app -y --data '{"test": "2.0.0"}'

[REQUIRED] Expected behavior

It should set the appropriate value in given path /app

[REQUIRED] Actual behavior

Throws error, here is debug log of it.

[debug] [2020-11-12T13:25:41.745Z] TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received an instance of Command
    at validateString (internal/validators.js:124:11)
    at Url.parse (url.js:159:3)
    at urlParse (url.js:154:13)
    at Object.urlResolve [as resolve] (url.js:663:10)
    at Object.getDatabaseUrl (/Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/utils.js:62:26)
    at /Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/commands/database-update.js:40:23
    at Generator.next (<anonymous>)
    at /Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/commands/database-update.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/commands/database-update.js:4:12)
    at Command.actionFn (/Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/commands/database-update.js:35:40)
    at Command.<anonymous> (/Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/command.js:171:25)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/chetangoti/.nvm/versions/node/v14.15.0/lib/node_modules/firebase-tools/lib/command.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[error]
[error] Error: An unexpected error has occurred.

Note

This is broken since v8.16.0 only. It works as I downgrade to v8.15.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions