Skip to content

Commit 9401c55

Browse files
committed
more logging
1 parent b31073f commit 9401c55

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

packages/compass/src/main/application.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,38 @@ class CompassApplication {
106106
safeStorage.setUsePlainTextEncryption(true);
107107
}
108108

109+
process.stdout.write('before setupPreferencesAndUser\n');
109110
const { preferences } = await setupPreferencesAndUser(
110111
globalPreferences,
111112
safeStorage
112113
);
114+
process.stdout.write('after setupPreferencesAndUser\n');
113115
this.preferences = preferences;
114116
await this.setupLogging();
117+
process.stdout.write('after setupLogging\n');
115118
await this.setupProxySupport(app, 'Application');
119+
process.stdout.write('after setupProxySupport\n');
116120
// need to happen after setupPreferencesAndUser and setupProxySupport
117121
await this.setupTelemetry();
122+
process.stdout.write('after setupTelemetry\n');
118123
await setupProtocolHandlers(
119124
process.argv.includes('--squirrel-uninstall') ? 'uninstall' : 'install',
120125
this.preferences
121126
);
127+
process.stdout.write('after setupProtocolHandlers\n');
122128

123129
// needs to happen after setupProtocolHandlers
124130
if ((await import('electron-squirrel-startup')).default) {
125131
debug('electron-squirrel-startup event handled sucessfully\n');
126132
return;
127133
}
134+
process.stdout.write('after electron-squirrel-startup\n');
128135

129136
// Accessing isEncryptionAvailable is not allowed when app is not ready on Windows
130137
// https://github.com/electron/electron/issues/33640
131138
await app.whenReady();
139+
140+
process.stdout.write('after app.whenReady\n');
132141
log.info(
133142
mongoLogId(1_001_000_307),
134143
'Application',
@@ -153,19 +162,22 @@ class CompassApplication {
153162
{ message: (e as Error).message }
154163
);
155164
}
165+
process.stdout.write('after connectionStorage.migrateToSafeStorage\n');
156166

157167
if (mode === 'CLI') {
158168
return;
159169
}
160170

161171
await this.setupCORSBypass();
172+
process.stdout.write('after setupCORSBypass\n');
162173
void this.setupCompassAuthService();
163174
// TODO(COMPASS-7618): For now don't setup auto-update in CI because the
164175
// toasts will obscure other things which we don't expect yet.
165176
if (!process.env.CI) {
166177
this.setupAutoUpdate();
167178
}
168179
await setupCSFLELibrary();
180+
process.stdout.write('after setupCSFLELibrary\n');
169181
setupTheme(this);
170182
this.setupJavaScriptArguments();
171183
this.setupLifecycleListeners();

packages/compass/src/main/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ async function main(): Promise<void> {
138138
try {
139139
await CompassApplication.init(mode, globalPreferences);
140140
} catch (e) {
141+
process.stdout.write(
142+
`Error during CompassApplication.init ${(e as any)?.message ?? ''}\n`
143+
);
141144
if (mode === 'CLI') {
142145
process.stderr.write('Exiting due to try/catch:\n');
143146
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)