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

v5.1.0 Fails to deploy on "firebaseextensions.instances.list" #1598

Open
jeffgaynor opened this issue Aug 21, 2024 · 6 comments
Open

v5.1.0 Fails to deploy on "firebaseextensions.instances.list" #1598

jeffgaynor opened this issue Aug 21, 2024 · 6 comments
Labels
Needs: Author Feedback Issues awaiting author feedback

Comments

@jeffgaynor
Copy link

jeffgaynor commented Aug 21, 2024

Related issues

n/a

[REQUIRED] Version info

node: v20.16.0

firebase-functions: ^5.1.0

firebase-tools: ^13.15.3

firebase-admin: "^12.3.1"

[REQUIRED] Test case

Run firebase deploy --only functions --force

[REQUIRED] Steps to reproduce

Upgrade Firebase Functions to latest version: 5.1.0

[REQUIRED] Expected behavior

Functions deploy successfully

[REQUIRED] Actual behavior

Functions fail to deploy

Were you able to successfully deploy your functions?

Initial output was:

$ firebase deploy --only functions --force

=== Deploying to 'my-project'...

i  deploying functions
i  functions: preparing codebase default for deployment
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: Loading and analyzing source code for codebase default to determine what to deploy
Serving at port 8[79](https://github.com/my-repo/actions/runs/10479672777/job/29025902274#step:7:80)0

✔  extensions: required API firebaseextensions.googleapis.com is enabled
i  extensions: ensuring required API firebaseextensions.googleapis.com is enabled...
✔  extensions: required API firebaseextensions.googleapis.com is enabled

Error: An unexpected error has occurred.
Error: Process completed with exit code 2.

Running deploy with debugging shows this detail:

[2024-08-21T14:58:54.306Z] TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.want (/home/runner/work/my-repo/node_modules/firebase-tools/lib/deploy/extensions/planner.js:120:28)
    at prepareDynamicExtensions (/home/runner/work/my-repo/node_modules/firebase-tools/lib/deploy/extensions/prepare.js:122:48)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async prepare (/home/runner/work/my-repo/node_modules/firebase-tools/lib/deploy/functions/prepare.js:62:9)
    at async chain (/home/runner/work/my-repo/node_modules/firebase-tools/lib/deploy/index.js:40:9)
    at async deploy (/home/runner/work/my-repo/node_modules/firebase-tools/lib/deploy/index.js:97:5)

Downgrading identical code to v5.0.1 works. So it's definitely an issue with v5.1.0, which included this: #1590 related to extensions.

@google-oss-bot
Copy link
Collaborator

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@AmilKey
Copy link

AmilKey commented Aug 23, 2024

I got an error "firebase cloud error Failed to load function definition from source" when I upgraded from 5.0.1 to 5.1.0

@rendomnet
Copy link

Same issue here.

[debug] [2024-08-26T16:42:30.433Z] TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.want (/Users/---/Library/pnpm/global/5/.pnpm/firebase-tools@13.15.3_encoding@0.1.13/node_modules/firebase-tools/lib/deploy/extensions/planner.js:120:28)

@christopheramason
Copy link

I am seeing an issue when deploying via CI probably due to a similar/related issue with a change made in 5.1.0

✔  extensions: required API firebaseextensions.googleapis.com is enabled
i  extensions: ensuring required API firebaseextensions.googleapis.com is enabled...
✔  extensions: required API firebaseextensions.googleapis.com is enabled

Error: HTTP Error: 403, The caller does not have permission

@metabit-goody
Copy link

I was able to resolve this by updating to the latest version of firebase-tools (13.16.0)

@exaby73
Copy link
Contributor

exaby73 commented Sep 9, 2024

@jeffgaynor @rendomnet @christopheramason Were you able to solve this as well by upgrading the firebase-tools package?

@exaby73 exaby73 added Needs: Author Feedback Issues awaiting author feedback and removed needs-triage labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Issues awaiting author feedback
Projects
None yet
Development

No branches or pull requests

7 participants