Firebase CLI giving segmentation fault on Ubuntu - firebase

I'm having a hard time with firebase CLI,when I install it with npm, either locally in a projet or globally, and I call the command firebase it gives Segmentation fault with no further details.
I firs thought that the problem was with my version of Node since I was using 9.x, I moved back to 8.x versions, and reinstalled firebase with no success, I upgraded to 12.x, with no success too always same error.
I'm using NVM to handle my node versions properly, but still I can't find a fix for this problem.
nvm list gives this :
-> v8.11.3
v8.13.0
v12.3.0
system
When I run npm list firebase-tools it gives firebase-tools#7.9.0, I also tried uninstalling and reinstalling with no success .

Related

Microsoft Visual C++ Runtime error - Assertion Failed

Using: VS Code
Working on: Running automation test scripts for WebdriverIO.
Error facing:
because of this error, my test specs are not executing. Is there any way to get rid of this??
Please follow the below steps to resolve this issue
Uninstall the current version of node.js.
Go to https://nodejs.org/en/blog/release/
Install the previous version of node.js (I installed from here 4.
https://nodejs.org/dist/v14.17.3/node-v14.17.3-x64.msi)
Restart your system
Try building the project using npm install
I hope this will solve your problem
The error here is coming from the Fibers npm package. Fibers only supports node versions before version 16. I had the same error message and switched the node version to 14.20.0 ,which is the newest LTS before version before 16 at the moment, and that solved the problem for me.

Codeship + Firebase functions:config:set = 404 method not found

Hi wonderful people of stackoverflow!
Background
I have an Angular 9 application and CI set up with Codeship. This has been running fine until about two weeks ago when suddenly it stopped working after I upgraded from Angular 7.
Set up commands:
nvm ls
nvm install v10.15.1
nvm use v10.15.1
gem install rb-inotify -v 0.9.10
gem install sass
npm install -g firebase-tools#6.12.0
npm i firebase-functions#3.3.0
yes | npm install -g #angular/cli#9.1.12
npm i
cd functions
nvm use v10.15.1
npm i
cd ..
Which runs as expected. I have checked the versions in the CI environment with npm outdated, which show me that the correct versions are being installed the same as local:
Deploy script:
firebase use default
firebase functions:config:set test="test" --token "$FIREBASE_TOKEN"
firebase deploy --token "$FIREBASE_TOKEN"
Error:
firebase use default is successful, but firebase functions:config:set test="test" --token "$FIREBASE_TOKEN" now returns:
Error: HTTP Error: 404, Method not found.
Notes:
I've reset up the $FIREBASE_TOKEN with the new cli and can confirm that this probably isn't the issue, because when the token is incorrect (I removed the last character from the TOKEN), it throws a different error stating this.
I can also confirm that the same script run locally works and deploys just fine - so while I can get around the problem this way, it isn't an ideal or long term solution.
Any ideas or help would be genuinely appreciated as I'm somewhat lost as to what to do next?
This seems to be related with firebase-tools version. When I installed the same version as you have (6.12.0) I got the same error.
I have tried on new version (I have 8.7.0) and it is working fine with one more remark. When I tried exactly the same command as you have error:
Error: Invalid argument, each config value must have a 2-part key (e.g. foo.bar).
So working command will be like this:
firebase functions:config:set test.test="test"
If you need old version of firebase-tools I tested few other versions and it seems that this is working since version 7.1.0.
For anyone else having this issue - I never managed to solved this sorry. However I migrated my CI over to use GitHub Actions easily and it all works without any issue.

Cannot update firebase tools from 3.19.1

Prior to version 4.0.0 being released I had no problems with my app. I have been trying to update Firebase Tools since 3.19.3 was released and it will not work. It says that it updates without any errors but the tools are stuck on version 3.19.1. It is not updating.
After the release of 4.0.0 hosting no longer works. Cloud functions and Firestore are working without issue. I don't get any errors. It just doesn't work. I've been tying everything I can and searching all over forums for answers and nothing.
Hosting is not working. Static assets are not loading. It says that index.html cannot be found...but that is because there is no index.html because I am using express-handlebars templating engine. I have index.handlebars which was working fine before the release of firebase-tools version 4.0.0.
Still can't update firebase-tools to the latest version.
The issue was that I had firebase-tools installed in two different directories on my computer. The directory that was being updated was not the directory that my project was using. I'm still not sure how that happened but I uninstalled firebase and node and reinstalled them and that solved the problem.
To update firebase-tools, just run this command in the terminal:
curl -sL firebase.tools | upgrade=true bash
note: you must have curl installed.

Setting up Firebase CLI to use Functions

I am trying to update my Firebase CLI installation, in order to use the cloud functions for my project. I followed the getting-started guide, however for some reason, the CLI cannot detect the updated version.
I initialized a project of mine that I have already created via the Firebase console. During the project initialization, Firebase CLI mentioned that my CLI version should be updated, however the complete procedure went smoothly.
Once the initialization completed, I run for the first time (to update the CLI):
npm install -g firebase-tools
Once the updated finished, the command line reported:
firebase-tools#3.18.6
But when I run
firebase init functions
I get:
Error: CLI is out of date (on 3.0.1 , need at least 3.0.5)
I don't understand why this is happening, since the update reported that version 3.18.6 got installed Any hints would be great!
For reference, you can see a snapshot of the command line here.
It looks like you may have multiple versions of node installed in different locations. First, uninstall all versions of node that you may have previously installed. Make sure running node on the command line doesn't execute anything. Then, reinstall everything. After you've installed the Firebase CLI again, check its version with firebase --version.

Grunt build fails in travis - "Cannot find any-promise implementation"

I'm using travis to test my code. Recently the grunt tasks have started to fail without no change being made to anything involved with grunt. (The new commit which is tested contains just very minor changes in two PHP files.)
Here is the part of log from travis:
$ grunt build:app
Running "typings:default" (typings) task
Warning: Cannot find any-promise implementation nor global.Promise. You must install polyfill or call require("any-promise/register") with your preferred implementation, e.g. require("any-promise/register")("bluebird") on application load prior to any require("any-promise"). Use --force to continue.
Aborted due to warnings.
The command "grunt build:app" exited with 3.
I tried to search for that warning message but couldn't find anything useful.
One more thing: When I run grunt build:app locally on my pc it works just fine.
Thanks for your time :)
I had the same problem when I started using grunt-typings. Worked locally and didn't work on my CI server. Ended up fixing it by doing what the error message suggests:
npm install bluebird
npm install any-promise
In GruntFile.js:
require("any-promise/register")("bluebird");
Update your node.js version to >v0.12. To check your version of node.js use node -v. The documentation of any-promise explains:
Node.js versions prior to v0.12 may have contained buggy versions of the global Promise. For this reason, the global Promise is not loaded automatically for these old versions. If using any-promise in Node.js versions versions <= v0.12, the user should register a desired implementation.

Resources