Skip to content

Commit

Permalink
Increases timeOut for detectFromPort to avoid sporadic deployment fails
Browse files Browse the repository at this point in the history
Co-authored-by: himanshu810e
  • Loading branch information
takahashi-shotaro-al committed Mar 19, 2024
1 parent c76e863 commit f8e2197
Showing 1 changed file with 2 additions and 2 deletions.
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: runtimes.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

0 comments on commit f8e2197

Please sign in to comment.