Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions deploy fails on firebase-tools version 13.15.3 but works in 13.15.2 #7575

Closed
Spitzbua opened this issue Aug 21, 2024 · 12 comments · Fixed by #7576
Closed

Functions deploy fails on firebase-tools version 13.15.3 but works in 13.15.2 #7575

Spitzbua opened this issue Aug 21, 2024 · 12 comments · Fixed by #7576

Comments

@Spitzbua
Copy link

Spitzbua commented Aug 21, 2024

[REQUIRED] Environment info

firebase-tools: 13.15.3

Platform: Windows

[REQUIRED] Test case

Deploy firebase function v2

[REQUIRED] Steps to reproduce

firebase deploy --only functions

[REQUIRED] Expected behavior

Functions will be deployed

[REQUIRED] Actual behavior

Deploy fails

[debug] [2024-08-21T13:09:58.665Z] TypeError: Cannot convert undefined or null to object
at Function.entries ()
at Object.want (C:\Users\thoma\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\firebase-tools\lib\deploy\extensions\planner.js:120:28)
at prepareDynamicExtensions (C:\Users\thoma\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\firebase-tools\lib\deploy\extensions\prepare.js:122:48)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async prepare (C:\Users\thoma\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\firebase-tools\lib\deploy\functions\prepare.js:62:9)
at async chain (C:\Users\thoma\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\firebase-tools\lib\deploy\index.js:40:9)
at async deploy (C:\Users\thoma\AppData\Roaming\fnm\node-versions\v20.16.0\installation\node_modules\firebase-tools\lib\deploy\index.js:97:5)
[error]

@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@aalej
Copy link
Contributor

aalej commented Aug 21, 2024

Hey @Spitzbua, thanks for reporting this! I was able to reproduce the error you mentioned. Let me raise this to our engineering team so they can take a look. For those also encountering this, could you try downgrading to v13.15.2 to workaround the issue.

@OlivierLebra
Copy link

Another workaround is to add an empty "extensions": [] array field to your firebase.json.

@gregfenton
Copy link

gregfenton commented Aug 21, 2024

I am seeing this issue pop up in 2 different public forums. When deploying with --debug they are seeing:

[2024-08-21T17:09:37.182Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/FOOBAR:testIamPermissions {"permissions":["firebase.projects.get","firebaseextensions.instances.list"]}
[2024-08-21T17:09:37.237Z] TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.want (C:\Users\FOOBAR\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\extensions\planner.js:120:28)
    at prepareDynamicExtensions (C:\Users\FOOBAR\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\extensions\prepare.js:122:48)
.......
.......

@dhamuace
Copy link

dhamuace commented Aug 21, 2024

I am getting same issue in my end today.

image

@dhamuace
Copy link

And guys after downgraded to v13.15.2 it finally works!!! Thanks for short workaround @aalej

@meisolated
Copy link

I was also facing the same issue, but making a small tweak to the command made it work for me.
image

@joehan
Copy link
Contributor

joehan commented Aug 21, 2024

Hey all, sorry for the inconvenience here. This should be fixed in 13.15.4, which will be available on npm shortly

@gregfenton
Copy link

No need to be sorry. We've all been here and will be here a million times again.

See it as the opportunity to improve test automation that it is! 😁

@siarheidudko
Copy link

siarheidudko commented Aug 22, 2024

@joehan Your fix has completely broken my project.
In CI (Github Actions) I used the command when deploying:
firebase deploy -m "Autodeploy from GitHUB ($GITHUB_ACTOR)" --only functions --force

It has completely removed all extensions and their settings ( #7582 ). Probably such actions lead to the fact that I will be forced to abandon firebase in the future, because your work is very unstable.

@gregfenton
Copy link

@siarheidudko In my opinion, that comment and flaying of blame is uncalled for.

Your system not having sufficient fail-safes, that takes "the latest and greatest" without safety checks or questions is not someone else's problem.

@siarheidudko
Copy link

@gregfenton I pay for Google services and I expect services of acceptable quality. In the concept of a service, I also include tools provided by Google or their subsidiaries such as Firebase. I understand mistakes when these mistakes do not lead to irreversible consequences. But today I had to spend several hours manually reinstalling and configuring all the deleted extensions. I also had to stop the project for a few hours while a decision was made to minimize the consequences.
The previous problem in 13.15.3, for example, did not lead to irreversible consequences and simply required a downgrade.
At the same time, the deployment of extensions from the documentation would have to occur with the commands firebase deploy --only extensions link But it doesn't work.
Moreover, the description available in the console does not provide for deleting all extensions at once or installing them from the env file.
If you consider it appropriate for yourself to deploy a test environment only for testing firebase-tools and update your CI processes manually, then this is your personal business and your personal money.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants