While I run the command firebase deploy I get this error:
i deploying functions
i functions: ensuring necessary APIs are enabled...
i runtimeconfig: ensuring necessary APIs are enabled...
✔ runtimeconfig: all necessary APIs are enabled
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (4.04 KB) for uploading
✔ functions: functions folder uploaded successfully
i starting release process (may take several minutes)...
i functions: creating function followerNotification...
⚠ functions: failed to create function followerNotification
⚠ functions: HTTP Error: 400, The request has errors
⚠ functions: 1 function(s) failed to be deployed.
Functions deploy had errors. To continue deploying other features (such as >database), run: firebase deploy --except functions
Error: Functions did not deploy properly.
Having trouble? Try firebase deploy --help
Everything else works without problems. Only when I trying to make something with Firebase Firestore.
This was happening to me too, then I realized that at the 2nd level, firestore only allows documents and not collections.
I was attempting to listen to this path:
/collection/document/{wildcard}
You can either do something like
/collection/{wildcard}
or
/collection/document/collection/{wildcard}
I had this problem as well. In my case it was because my trigger path had a trailing slash in the document path.
So changing:
functions.firestore
.document('some_path/{pushId}/')
To:
functions.firestore
.document('some_path/{pushId}')
Fixed it it for me. It seems like this is caused by a variety of issues and the firebase cli does not do a good job at explaining the reasons why.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With