Skip to content

Commit 05160a6

Browse files
committed
Fix the 'no terminal detected' error flood
A small number of users are hitting this issue, and sending error reports every 10 seconds while the app is open. This is annoying. For now, I've disabled the existing Sentry DSN. This commit moves to a new one (for the exact same project), and ensures that reports are only ever sent once.
1 parent b8a8ae0 commit 05160a6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/error-tracking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function initErrorTracking() {
99
let { SENTRY_DSN } = process.env;
1010
if (!SENTRY_DSN && IS_PROD_BUILD) {
1111
// If we're a built binary, use the standard DSN automatically
12-
SENTRY_DSN = 'https://f6775276f60042bea6d5e951ca1d0e91@sentry.io/1371158';
12+
SENTRY_DSN = 'https://5838a5520ad44602ae46793727e49ef5@sentry.io/1371158';
1313
}
1414

1515
if (SENTRY_DSN) {

src/interceptors/terminal/fresh-terminal-interceptor.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ const resetShellStartupScripts = () => {
360360

361361
const terminals: _.Dictionary<ChildProcess[] | undefined> = {}
362362

363+
// Memoize this report: i.e. send it only once
364+
const reportNoTerminal = _.memoize(() => {
365+
reportError('No terminal could be detected');
366+
});
367+
363368
export class TerminalInterceptor implements Interceptor {
364369

365370
id = 'fresh-terminal';
@@ -369,7 +374,7 @@ export class TerminalInterceptor implements Interceptor {
369374

370375
async isActivable(): Promise<boolean> {
371376
const terminalAvailable = !!(await getTerminalCommand());
372-
if (!terminalAvailable) reportError('No terminal could be detected');
377+
if (!terminalAvailable) reportNoTerminal();
373378
return terminalAvailable;
374379
}
375380

0 commit comments

Comments
 (0)