[go: nahoru, domu]

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

firebase deploy --only functions:oneFunction fails but function is deployed successfully #3147

Closed
ljle opened this issue Feb 18, 2021 · 8 comments · Fixed by #3150
Closed
Assignees

Comments

@ljle
Copy link
ljle commented Feb 18, 2021

[REQUIRED] Environment info

firebase-tools: 9.4.0

Platform: Arch Linux on WSL2 with Node 12.20.1

[REQUIRED] Test case

I don't have a minimal test case for this.

[REQUIRED] Steps to reproduce

  • Run firebase deploy --only functions:oneFunction

[REQUIRED] Expected behavior

  • Output in the console that the function was successfully deployed.

[REQUIRED] Actual behavior

  • Output says there were errors deploying the function:
    image

  • If I run the command with the --debug flag, the last lines of the logs say this:
    image

  • But in the Google Cloud Console for Cloud Functions dashboard, in the "last deployed" column it displays the time as if it was correctly deployed, I had to manually test my app and the change was deployed correctly.
    image

@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@ljle ljle changed the title firebase deploy --only functions:oneFunction fails but function seems to be deployed successfully firebase deploy --only functions:oneFunction fails but function is deployed successfully Feb 18, 2021
@joehan joehan self-assigned this Feb 18, 2021
@m4recek
Copy link
m4recek commented Feb 18, 2021

We have had same problem and few more with 9.4.0 and reverted to 9.3.0 to get our deploys working again.

  • error in deploy, success in cloud console
  • error in deploy, in progress in cloud console (subsequent retry failed because HTTP Error: 400, An operation on function ... is already in progress
  • reporting error for one function from a batch and not reporting status of the rest of the batch
  • 9.4.0 is creating new functions without Allow unauthenticated flag, 9.3.0 is using it. I believe this is not documented anywhere

@joehan
Copy link
Contributor
joehan commented Feb 18, 2021

Hi @ljle, thanks for reporting this. It looks like the issue here is that the function you deployed is taking longer to deploy than our timeout on polling the operation. I'll make a PR to increase this timeout, which should help.

@m4recek I think the first 2 issues are related to this timeout - I'll take a closer look into the other 2 shortly.

@joehan
Copy link
Contributor
joehan commented Feb 18, 2021

@m4recek

  • reporting error for one function from a batch and not reporting status of the rest of the batch

Could you open a separate issue for this and include logs of what you're seeing? I think I identified one issue with the code that might cause this, but I want to make sure its actually what you are seeing,

  • 9.4.0 is creating new functions without Allow unauthenticated flag, 9.3.0 is using it. I believe this is not documented anywhere

On further inspection, I think this is related to the same timeout issue - we set the necessary IAM policy to 'allow unauthenticated' for new functions here: https://github.com/firebase/firebase-tools/blob/master/src/deploy/functions/tasks.ts#L81, but it the operation polling times out, this will never be run.

@komachi
Copy link
komachi commented Feb 19, 2021

Experienced same problems on 9.4.0. Trying multiple functions deploy, only one get actually deployed (as indicated by cloud console), but CLI reports all failing. Running deploy with --debug indicate that it tries to re-run deploy of that function until timeout is hit (lots of Retrying task index 0 followed by FirebaseError: Task index 0 failed: timed out after 300000ms.).

Downgrade to 9.3.0 helped, and build are passing fine again, but was hard to debug, running deploy without --debug just fails without any meaningful message.

@janswist
Copy link
janswist commented Feb 20, 2021

I have the very same issues. Trying to upload barely changed functions and I get deployment error. It's really irritating especially when I have some quick fix to push, but google server throws error without specifically saying what's the matter. Tried last three versions of firebase-tools, but no luck.

@taylorhoward92
Copy link
taylorhoward92 commented Feb 21, 2021

I've been seeing this issue recently as well. It has been happening every time since upgrading firebase-tools from v9.2.0 to v9.4.0.

@mbleigh
Copy link
Contributor
mbleigh commented Feb 22, 2021

I've created #3150 to increase the timeout and address this. We will likely get it released in the next day or two, but in the meantime you can either downgrade to v9.3.0 or install directly from the PR branch:

npm i -g firebase/firebase-tools#mb-fn-timeout

mbleigh added a commit that referenced this issue Feb 22, 2021
mbleigh added a commit that referenced this issue Feb 22, 2021
Co-authored-by: joehan <joehanley@google.com>
This was referenced Mar 12, 2021
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this issue Dec 14, 2021
Co-authored-by: joehan <joehanley@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants