Firebase CLI commands printing unexpected malicious looking response on Linux, The text has infinite number of word: 'testing'

Solution 1:

A developer added a "new American flag module" to colors.js library yesterday in version v1.4.44-liberty-2 that he then pushed to GitHub and npm. The infinite loop introduced in the code will keep running indefinitely; printing the gibberish non-ASCII character sequence endlessly on the console for any applications that use the library.

It stems from the winston logging dep requiring logform that in turn requires colors https://github.com/winstonjs/logform/blob/7e18114c6426e4b69a76b1d8a023c87801421677/package.json#L31

Solution 2:

I am facing the same bug. The problem is due to a Firebase GitHub action that uses the colors.js library. You can check the solution status in the following issue: https://github.com/FirebaseExtended/action-hosting-deploy/issues/188

Solution 3:

Had that same issue today! after hours of trying probably EVERYTHING:

uninstall firebase-tools by running:

npm uninstall -g firebase-tools

then reinstall by running:

curl -sL https://firebase.tools | bash

(if you havent installed curl command, follow the instructions on terminal now)

then i tried "firebase login" one more time, getting: "-bash: /usr/local/bin/firebase: No such file or directory"

if you face it, follow the instructions under "Steps to reproduce" here: https://github.com/firebase/firebase-tools/issues/1851 (actually removes any version left i guess)

then reinstall with:

npm install -g firebase-tools

now try to:

firebase login

don't ask me how but... solved my problem! hope it will help you!