Skip to content

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

Closed

Description

@Spitzbua

[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]

Activity

  1. google-oss-bot commented on Aug 21, 2024

    @google-oss-bot
    Collaborator

    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.

  2. aalej commented on Aug 21, 2024

    @aalej
    Contributor

    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.

  3. OlivierLebra commented on Aug 21, 2024

    @OlivierLebra

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

  4. gregfenton commented on Aug 21, 2024

    @gregfenton

    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)
    .......
    .......
    
  5. dhamuace commented on Aug 21, 2024

    @dhamuace

    I am getting same issue in my end today.

    image

  6. dhamuace commented on Aug 21, 2024

    @dhamuace

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

  7. meisolated commented on Aug 21, 2024

    @meisolated

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

  8. joehan commented on Aug 21, 2024

    @joehan
    Member

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

  9. gregfenton commented on Aug 21, 2024

    @gregfenton

    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! 😁

  10. siarheidudko commented on Aug 22, 2024

    @siarheidudko

    @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.

  11. gregfenton commented on Aug 22, 2024

    @gregfenton

    @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.

  12. siarheidudko commented on Aug 22, 2024

    @siarheidudko

    @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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions