Skip to content

4 out of 13 builds fail with: Build failed with status: EXPIRED and message: An unexpected error occurred #7430

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

Open
berengamble opened this issue Jul 10, 2024 · 11 comments

Comments

@berengamble
Copy link

berengamble commented Jul 10, 2024

Environment info

firebase-tools: 13.13.1

Platform: Mac OS Sonoma 14.0

Test cases

1.
firebase experiments:disable functionsv2deployoptimizations
firebase deploy --only functions:main with a codebase containing 13 2nd generation Cloud Functions.
2
firebase experiments:enable functionsv2deployoptimizations
firebase deploy --only functions:main with a codebase containing 13 2nd generation Cloud Functions.

Steps to reproduce

Same as test cases

Expected behavior

All functions successfully deployed.

Actual behavior

In both cases, after running the above commands and waiting about 10 minutes, 4-5 of the functions will complete successfully fairly early in the build, then after a few more minutes, the rest fail with errors like this, then the messages saying a couple more successfully deployed, all together in one big chunk of logs at the end.:

Build failed with status: EXPIRED and message: An unexpected error occurred. Refer to build logs: https://console.cloud.google.com/cloud-build/builds;region=us-central1/90e2bdef-d529-4dbe-be9e-355a18fc835e?project=1033623241793. For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=us-central1/90e2bdef-d529-4dbe-be9e-355a18fc835e?project=1033623241793.

The confusing thing is, in GCP Console, there's a ⚠️ sign on each function that errored and this is shown: Function is active, but the last deployment failed.

There is nothing useful in the build logs, as outlined in these two tickets: #5967 & #5969 #7268

@google-oss-bot
Copy link
Contributor

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

@Nushio
Copy link

Nushio commented Jul 10, 2024

This was seemingly fixed in #7268 , however the fix seems to be a slow rollout.

I can confirm that on my end, I haven't had any issues since around July 4, but maybe the fix is still rolling out?

@berengamble
Copy link
Author

Ah yes, that was the issue I meant to reference above. I've updated my original comment.

Despite these two issues being resolved, I am still experiencing this problem.

@halafi
Copy link

halafi commented Jul 11, 2024

I still have the issue #7268

Name: functionsv2deployoptimizations
Enabled: yes

tools v13.13.1

@aalej
Copy link
Contributor

aalej commented Jul 11, 2024

Hey folks, sorry to hear you’re still encountering this issue. I’m discussing this with our engineering team to see what could be causing the issue.

In the meantime, to unblock you from updating your functions, could you try deploying using firebase deploy --only functions:<function_name>, or firebase deploy --only functions:<codebase>:<function_name> if you're using codebases, for the functions which encountered an error.

Function is active, but the last deployment failed.

The function is still running and processing requests, however updating the function's code with the latest deployment failed. This means the function is still running the older version of the code.

@berengamble
Copy link
Author

I can confirm that deploying each function individually does result in a successful deployment. While this is a workaround, this level of hand-holding for each deploy is exactly optimal. Any idea when this will be fixed?

@berengamble
Copy link
Author

berengamble commented Jul 26, 2024

Any progress on this? It's still happening for me on every. single. deploy. I'm using 13.14.1 now.

@Ekhogecko
Copy link

This is also happening for our project of ~80 functions deployed across v1 and v2

@IAmKio
Copy link

IAmKio commented Feb 25, 2025

Still happening for our project, approx 15 functions, deploying via GitHub actions using npx firebase-tools

Image

@lscown
Copy link

lscown commented Apr 10, 2025

Can we please get an update on this? Experimental flags aren't working. Deployment is incredibly slow too.

@ThomasKientz
Copy link

Fond a clue, in firebase-debug.log I noticed "Got source token undefined" before each failed build.

[debug] [2025-05-05T19:52:46.852Z] Got source token undefined for region europe-west1
[error] Build failed with status: EXPIRED and message: An unexpected error occurred. Refer to build logs: https://console.cloud.google.com/cloud-build/builds;region=europe-west1/ad854826-f716-489c-95ca-7f0f0b481e17?project=460783385512. For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=europe-west1/ad854826-f716-489c-95ca-7f0f0b481e17?project=460783385512.

Are you all also affected by #6898? Could be related!

@joehan joehan assigned colerogers and unassigned blidd-google May 6, 2025
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