Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ChetanGoti opened this issue Nov 12, 2020 · 1 comment · Fixed by #2815
Closed

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

ChetanGoti opened this issue Nov 12, 2020 · 1 comment · Fixed by #2815
Assignees

Comments

@ChetanGoti
Copy link

[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

@bkendall bkendall self-assigned this Nov 12, 2020
@bkendall
Copy link
Contributor

Thanks for the report. I know there's been an update in this path recently by me, and I'll take a quick look.

@bkendall bkendall changed the title database:set is broken in 8.16 (Works with 8.15.1) database:update is broken in 8.16 (Works with 8.15.1) Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants