firebase-functions: FirebaseError object endpoints[testme].availableMemoryMb failed validation
[REQUIRED] Version info
node: v16.13.1
firebase-functions: 4.0.0-rc.0 (also reproduced with 3.24.1)
firebase-tools: N/A (in yarn.lock)
firebase-admin: 11.1.0
[REQUIRED] Test case
const admin = require('firebase-admin');
const functions = require("firebase-functions");
admin.initializeApp();
exports.testme = functions.firestore.document('/users/{ts}')
.onUpdate((snap, context) => {
functions.logger.debug("This is a test");
});
[REQUIRED] Steps to reproduce
firebase deploy --only functions:testme
[REQUIRED] Expected behavior
The deployment completes successfully, as it always happened on this codebase for the last 6 months (and as far as I can recall, while working with Firebase Functions)
[REQUIRED] Actual behavior
=== Deploying to 'fenix-app-39599'...
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing codebase default for deployment
Error: Failed to parse build specification:
- FirebaseError object endpoints[testme].availableMemoryMb failed validation
Having trouble? Try firebase [command] --help
Were you able to successfully deploy your functions?
See above.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 18
- Comments: 45 (2 by maintainers)
I fixed this by updating firebase tools
npm install -g firebase-tools
I got it working again. These are my steps:
rm -rf functions/node_modules
package.json
to rollback versions:From
To
firebase --version
is11.14.0
;node --version
is16.14.2
.I’m not sure what that issue really is, or where it’s coming from, so I’ll let you folks decide whether to close this issue or not.
Thanks for the support!
I second this. Additional note using yarn to install didn’t make the cut. I still have to use npm i - g!
Switch to functions folder and update firebase tools with
npm install -g firebase-tools
this worked for me 👍
What is going on here. I just reopen the code editor try to deploy 2 days later same code…
Error: Failed to fetch Run service undefined
What is going on here?
This worked for me as well. Be sure to switch to the functions folder.
cd functions
and then
npm install -g firebase-tools
I was running into the
functions: Failed to load function definition from source: FirebaseError: Failed to parse build specification
error after updating tofirebase-functions
v4 as well. After making sure I had the latest Node version for the release I was using (eg.16.19.1
at this point) and making sure I had the latestfirebase-tools
version installed, I tracked this down to an empty string being passed to thevpcConnector
parameter for multiple functions’runWith
configuration blocks:We were using an empty string for a local function emulator level config since it isn’t used for local development, but that appears to have broken with
firebase-functions@4.x.x
. Changing the value to any non-empty string here resolved the issue we were running into.Not sure if anyone else that’s running into this is doing something similar, but maybe there are other values which are also causing issues for other parameters?
doesnt work, with all provided “solutions”… Where is the problem… All i get is:
Yes, this same error has cropped up today for me as well. Please look into it urgently @firebase-ops because it’s impacting our software release.
Thanks @mrodrig - I changed the value from an empty string to
null
and that fixed it.@radykal No need to switch to the functions folder since you are installing it globally with the flag
-g
Just check the node version - using 16.x worked for me.
For all lost souls out there who don’t deserve an answer… Here is my fix at the dependency moshpit and it works!
Idk support, idk…
For me this helped:
cd functions
npm install
npm start
source ~/.zshrc
npm i -g firebase-tools
firebase deploy --only functions
Any news here? This is rather odd…
Still failing builds…
I am experiencing the same. Did you manage to solve this?
npm install -g firebase-tools
won’t do the trick for me.Funciono para mi 👍🏻
Thank you @DhruvRaiPuri and @taeold .
I’m using firebase-tools version
11.14.0
and it’s still failing for me. I’m trying to update to11.14.4
but for some reason the commandnpm install -g firebase-tools
completes successfully butfirebase --version
is still returning11.14.0
, which is odd.I’ll keep on investigating.