diff --git a/lib/components/secondary-device-qr-auth-context-provider.react.js b/lib/components/secondary-device-qr-auth-context-provider.react.js --- a/lib/components/secondary-device-qr-auth-context-provider.react.js +++ b/lib/components/secondary-device-qr-auth-context-provider.react.js @@ -93,6 +93,10 @@ if (!loggedIn) { logoutStateResetPromise.current = (async () => { await logoutStateResetPromise.current; + console.info( + new Date().toISOString(), + '- Awaiting DB deletion before generating QR', + ); await waitUntilDatabaseDeleted(); logoutStateResetPromise.current = null; })(); @@ -122,6 +126,11 @@ ]); const aesKeyAsHexString: string = uintArrayToHexString(rawAESKey); + console.info( + new Date().toISOString(), + '- Generated QR code for deviceID:', + ed25519, + ); setUnauthorizedDeviceID(ed25519); setQRData({ deviceID: ed25519, aesKey: aesKeyAsHexString }); setQRAuthState('not_started'); diff --git a/lib/utils/wait-until-db-deleted.js b/lib/utils/wait-until-db-deleted.js --- a/lib/utils/wait-until-db-deleted.js +++ b/lib/utils/wait-until-db-deleted.js @@ -34,6 +34,8 @@ for (const callback of callbacksToTrigger) { callback(); } + + console.info(new Date().toISOString(), '- Database deletion reported.'); } export { diff --git a/lib/webpack/shared.cjs b/lib/webpack/shared.cjs --- a/lib/webpack/shared.cjs +++ b/lib/webpack/shared.cjs @@ -7,6 +7,7 @@ async function getConfig(configName) { const { getCommConfig } = await import( + // eslint-disable-next-line monorepo/no-relative-import '../../keyserver/dist/lib/utils/comm-config.js' ); return await getCommConfig(configName); @@ -140,7 +141,10 @@ plugins: [ ...babelRule.options.plugins, '@babel/plugin-transform-react-constant-elements', - ['transform-remove-console', { exclude: ['error', 'warn'] }], + [ + 'transform-remove-console', + { exclude: ['error', 'warn', 'info'] }, + ], ], }, }, diff --git a/web/shared-worker/sqlite-data-handler.js b/web/shared-worker/sqlite-data-handler.js --- a/web/shared-worker/sqlite-data-handler.js +++ b/web/shared-worker/sqlite-data-handler.js @@ -47,6 +47,7 @@ shouldClearData(sqliteStampedUserID, currentLoggedInUserID) ) { try { + console.info(new Date().toISOString(), '- Starting DB cleanup'); setDatabaseResetStatus(databaseResetStatus.RESET_IN_PROGRESS); await sharedWorker.init({ clearDatabase: true }); setDatabaseResetStatus(databaseResetStatus.READY);