You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous code was not actually failing when we exhausted the time limit for checking if a backend was running.
I also tried to improve some of the error messaging around the binary failing to run at all by checking that `--help` works first before spawning the main process.
GitOrigin-RevId: 7fad056e1f8c7637d91aea687d924047c558b47f
"Local backend exited because shared libraries are missing. These may include libraries installed via 'Microsoft Visual C++ Redistributable for Visual Studio.'";
222
+
returnctx.crash({
223
+
exitCode: 1,
224
+
errorType: "fatal",
225
+
printedMessage: message,
226
+
errForSentry: message,
227
+
});
228
+
}elseif(result.status!==0){
229
+
constmessage=`Failed to run backend binary, exit code ${result.status}, error: ${result.stderr.toString()}`;
230
+
returnctx.crash({
231
+
exitCode: 1,
232
+
errorType: "fatal",
233
+
printedMessage: message,
234
+
errForSentry: message,
235
+
});
236
+
}
237
+
}catch(e){
238
+
constmessage=`Failed to run backend binary: ${(easany).toString()}`;
logVerbose(ctx,`Starting local backend: \`${commandStr}\``);
214
248
constp=child_process
@@ -224,13 +258,6 @@ export async function runLocalBackend(
224
258
ctx,
225
259
`Local backend exited with code ${code}, full command \`${commandStr}\``,
226
260
);
227
-
// STATUS_DLL_NOT_FOUND
228
-
if(code===3221225781){
229
-
logVerbose(
230
-
ctx,
231
-
"Local backend exited because shared libraries are missing. These may include libraries installed via 'Microsoft Visual C++ Redistributable for Visual Studio.'",
232
-
);
233
-
}
234
261
});
235
262
constcleanupHandle=ctx.registerCleanup(async()=>{
236
263
logVerbose(ctx,`Stopping local backend on port ${ports.cloud}`);
@@ -273,8 +300,10 @@ export async function ensureBackendRunning(
273
300
errorType: "fatal",
274
301
printedMessage: `A different local backend ${text} is running on selected port ${args.cloudPort}`,
0 commit comments