1

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:

enter image description here

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?

William Tonkin-Howe
  • 487
  • 1
  • 3
  • 12

2 Answers2

0

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.

vitooh
  • 4,132
  • 1
  • 5
  • 16
  • Thanks for checking vitooh, sadly I'm still getting the same error with `firebase-tools` 6.12.0, 7.1.0 & 8.7.0. I've cleared the build cache, etc. but it still shows the same error for all three. – William Tonkin-Howe Aug 27 '20 at 02:09
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.

William Tonkin-Howe
  • 487
  • 1
  • 3
  • 12