I want to remove a node (~13mb) from my realtime database. I use cli with firebase database:remove '/node'
but i am getting An unexpcted error
. Debug file says:
[debug] [2020-09-30T10:17:16.845Z] TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at validateString (internal/validators.js:122:11)
at Url.parse (url.js:159:3)
at urlParse (url.js:154:13)
at Url.resolve (url.js:667:29)
at Object.urlResolve [as resolve] (url.js:663:40)
at Object.getDatabaseUrl (/usr/local/lib/node_modules/firebase-tools/lib/utils.js:62:26)
at Command.actionFn (/usr/local/lib/node_modules/firebase-tools/lib/commands/database-remove.js:33:32)
at Command.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/command.js:166:25)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/command.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
When i do a firebase database:get '/node'
i am getting the correct values.
I already updated firebase-tools and did a new init.
I experienced a similar problem today and submitted this as an issue on the firebase-tools GitHub:
https://github.com/firebase/firebase-tools/issues/2667
I manually added a trivial key to the database and
firebase database:remove
had the same problem attempting to remove it.Hopefully others there can reproduce and solve it.
(I would have commented this if I had the reps... But perhaps watching the issue get addressed over there is the true answer anyway )
Edit: Resolved with Changelog for database:remove command fix #2658 merged into master and released in version 8.12.0 - Works great