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

Closed
jeffgaynor opened this issue Aug 21, 2024 · 11 comments
Closed

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

jeffgaynor opened this issue Aug 21, 2024 · 11 comments

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/[email protected][email protected]/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
@google-oss-bot
Copy link
Collaborator

Hey @jeffgaynor. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Collaborator

Since there haven't been any recent updates here, I am going to close this issue.

@jeffgaynor if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@exetico
Copy link

exetico commented Sep 25, 2024

@google-oss-bot : I'm facing the same issue. Could you please re-open it?

What's the most fitted IAM role for firebaseextensions.instances.list? I'm struggling to find it.

    "firebase-functions": "^6.0.1",
    "firebase-tools": "^13.19.0",

Also mentioned here:
firebase/firebase-tools#7582 (comment)

@ifielker
Copy link
Contributor

Firebase Extensions Viewer is a good role for giving firebaseextensions.instances.list

@kevinsschmidt
Copy link

kevinsschmidt commented Oct 18, 2024

I can't even find firebaseextensions.instances.list in IAM.

image

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

No branches or pull requests

10 participants