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

Increases timeOut for detectFromPort to avoid sporadic deployment fails #6888

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/deploy/functions/runtimes/discovery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export async function detectFromPort(
port: number,
project: string,
runtime: Runtime,
timeout = 10_000 /* 10s to boot up */,
timeout = 30_000 /* 30s to boot up. 30s may be too long, but many timeouts were reported when it was set to 10s. Please refer to https://github.com/firebase/firebase-tools/issues/5888#issuecomment-2004446757 for more details. */,
): Promise<build.Build> {
let res: Response;
const timedOut = new Promise<never>((resolve, reject) => {
setTimeout(() => {
reject(new FirebaseError("User code failed to load. Cannot determine backend specification"));
reject(new FirebaseError("User code failed to load. Cannot determine backend specification. If there is no issue with the code, it may have timed out due to taking too long to load."));
}, timeout);
});

Expand Down