Skip to content

Cannot redeploy functions after CLI upgrade from 10.2.2→10.3.0 #4307

Closed

Description

@dsl101

[REQUIRED] Environment info

firebase-tools: 10.3.0

Platform: Windows

[REQUIRED] Test case

Function in module, named by path httpsDeptest:

const { functions } = require('utils')

exports = module.exports = functions.https.onCall(() => {
  console.log('ok')
})

[REQUIRED] Steps to reproduce

Deploy twice. First deploy works fine, second fails:

$ firebase deploy --only=functions:httpsDeptest

=== Deploying to '[REMOVED]'...

i  deploying functions
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
+  functions: required API cloudbuild.googleapis.com is enabled
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (120.01 KB) for uploading
i  functions: ensuring required API cloudscheduler.googleapis.com is enabled...
+  functions: required API cloudscheduler.googleapis.com is enabled
+  functions: functions folder uploaded successfully
i  functions: creating Node.js 14 function httpsDeptest(us-central1)...
+  functions[httpsDeptest(us-central1)] Successful create operation.
Function URL (httpsDeptest(us-central1)): https://us-central1-[REMOVED].cloudfunctions.net/httpsDeptest
i  functions: cleaning up build files...

+  Deploy complete!

$ firebase deploy --only=functions:httpsDeptest

=== Deploying to '[REMOVED]'...

i  deploying functions
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
+  functions: required API cloudbuild.googleapis.com is enabled
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (120.01 KB) for uploading
i  functions: ensuring required API cloudscheduler.googleapis.com is enabled...
+  functions: required API cloudscheduler.googleapis.com is enabled
+  functions: functions folder uploaded successfully

Error: [httpsDeptest(us-central1)] Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.

[REQUIRED] Expected behavior

That the function would redeploy.

[REQUIRED] Actual behavior

Deployment ends with:

Error: [httpsDeptest(us-central1)] Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.

Activity

  1. dsl101 commented on Mar 16, 2022

    @dsl101
    Author

    Reverting to 10.2.2 works around the problem for now. I didn't include the full --debug output, as it seemed to contain quite a bit of sensitive info. Please advise if it required.

  2. Schmale97 commented on Mar 16, 2022

    @Schmale97

    I am also seeing this issue on Ubuntu

  3. nachoalthabe commented on Mar 16, 2022

    @nachoalthabe

    Also on Mac

  4. bkendall commented on Mar 16, 2022

    @bkendall
    Contributor

    Sounds like an issue in the CLI - I'll quickly raise with the Functions team.

  5. LeadDreamer commented on Mar 16, 2022

    @LeadDreamer

    I just dropped back to 10.2.2 - did NOT solve the problem. Otherwise same symptoms

    Improper fallback. Forced it again. seems to be working.

  6. dcgudeman commented on Mar 16, 2022

    @dcgudeman

    Any update on this?

  7. gustavopch commented on Mar 16, 2022

    @gustavopch

    Same error here when redeploying a function with [email protected] on GitHub Actions on an Ubuntu 20.04.4 machine.

    Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.
    
  8. ivan416 commented on Mar 16, 2022

    @ivan416

    Downgraded to 10.2.2 for now, since it works ok there. Glad to hear I'm not the only one experiencing this issue.
    https://stackoverflow.com/questions/71368085/gcp-cloud-function-environment-variable-becomes-unset

  9. taeold commented on Mar 16, 2022

    @taeold
    Contributor

    Hi folks - apologies for trouble here.

    We are working hard to get a fix out. We expect new version w/ the fix to be out by this afternoon US Pacific time.

    In the meantime, here are some workarounds:

    1. Pin Firebase CLI to v10.2.2.

    2. If you must use the latest Firebase CLI: A temporary workaround is to remove "deployment-callable" or "deployment-callabled" label from your callable function. To do this, go to https://pantheon.corp.google.com/functions/list and find your function, and remove the said label:

    image

    Note that the label will reappear after Firebase CLI deploy, so this is more-or-less a one time fix.

    Again, apologies and will keep this thread updated as we release a patch.

  10. added a commit that references this issue on Mar 16, 2022
    c8337ee
  11. dcgudeman commented on Mar 16, 2022

    @dcgudeman

    when will fix #4310 be released?

  12. taeold commented on Mar 16, 2022

    @taeold
    Contributor

    @dcgudeman We just shipped v10.3.1:

    https://github.com/firebase/firebase-tools/releases/tag/v10.3.1

    Please give the latest cli version a go:

    npm i -g firebase-tools@latest
    
  13. gustavopch commented on Mar 16, 2022

    @gustavopch

    That was fast!

  14. taeold commented on Mar 16, 2022

    @taeold
    Contributor

    @gustavopch It was a very bad bug :( Apologies everyone!

  15. davidhowe commented on May 12, 2025

    @davidhowe

    I have now similar issue, I can deploy all my functions but subsequent deploy will create this in random eventarc functions [eventarc-queryAgent(us-central1)] Changing from an HTTPS function to a background triggered function is not allowed. Please delete your function and create a new one instead.

    Then i have to go manually to console, delete this function. Deploy and everything works. Any ideas ?

    I see the same. I had switched projects and when redeploying the trigger functions all experienced the same fate, until I deleted said functions and redeployed.

  16. Justus-M commented on Aug 13, 2025

    @Justus-M

    I'm also seeing this issue, even when the initial deployment failed. Also I can't actually find the function anywhere in the console

  17. michi88 commented on Feb 16, 2026

    @michi88
    Contributor

    Also ran into this. For some reason, sometimes, the function that you need to delete is only visible in the firebase console (and not in GCP directly). https://console.firebase.google.com/u/0/project/[your project]/functions. You can delete it using the cli.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions