iOfficeAI/AionUi · error · Error
Failed to flush feedback report${eventId ? ` (${eventId})` :
Error message
Failed to flush feedback report${eventId ? ` (${eventId})` : ''}: Sentry is not initialized What it means
After submitting a feedback report with a `flushTimeoutMs`, the code calls `Sentry.getClient().flush(...)`; if no Sentry client exists (SDK never initialized in this renderer), it throws this error because the report events were queued to a non-existent transport and will never be delivered.
Source
Thrown at packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:306
});
eventId = Sentry.captureEvent(
{
level: 'info',
message: eventSummary,
extra: {
description: normalizedDescription,
...input.extra,
},
},
{ attachments }
);
});
if (input.flushTimeoutMs !== undefined) {
const client = Sentry.getClient();
if (!client) {
throw new Error(`Failed to flush feedback report${eventId ? ` (${eventId})` : ''}: Sentry is not initialized`);
}
const flushed = await client.flush(input.flushTimeoutMs);
if (!flushed) {
throw new Error(`Failed to flush feedback report${eventId ? ` (${eventId})` : ''}`);
}
}
logFeedbackReport('info', 'submitted', {
module: input.module,
eventId,
collectLogs: Boolean(input.collectLogs),
logAttachment: summarizeLogAttachment(logAttachmentStatus, logAttachment),
dbDiagnosticsAttachment: summarizeDbDiagnosticsAttachment(dbDiagnosticsAttachmentStatus, dbDiagnosticsAttachment),
attachmentCount: attachments.length,
attachments: summarizeAttachments(attachments),
flushTimeoutMs: input.flushTimeoutMs,
tagKeys: Object.keys(input.tags ?? {}),View on GitHub (pinned to 711aa0550e)
Solutions
- Ensure `Sentry.init` runs (with a valid DSN) before any submitFeedbackReport call that sets flushTimeoutMs
- If telemetry can be disabled, skip the flush block when `Sentry.getClient()` is null instead of throwing
- Check init ordering in app bootstrap and that the DSN/config loaded correctly
- For opted-out users, resolve submission gracefully (log-and-continue) rather than failing the report flow
Example fix
// before
const client = Sentry.getClient();
if (!client) {
throw new Error(`Failed to flush feedback report…: Sentry is not initialized`);
}
const flushed = await client.flush(input.flushTimeoutMs);
// after
const client = Sentry.getClient();
if (!client) {
logFeedbackReport('warn', 'sentry-unavailable', {});
return { eventId, flushed: false } as const;
} Defensive patterns
Strategy: type-guard
Validate before calling
if (input.flushTimeoutMs !== undefined && !Sentry.getClient()) { /* skip flush, log */ } Type guard
const isSentryReady = (): boolean => Sentry.getClient() !== undefined;
Try / catch
catch (e) { if (e.message.includes('Sentry is not initialized')) { log.warn('telemetry unavailable'); return; } throw e; } Prevention
- Initialize Sentry at app bootstrap before feedback flows
- Treat telemetry absence as non-fatal
When it happens
Trigger: Calling `submitFeedbackReport` with `flushTimeoutMs` defined while `Sentry.init` was never executed (or was skipped due to config/DSN absence or an early-init failure) in the current process.
Common situations: Sentry disabled in dev builds or via config flag but the flush path still requested; init raced or crashed (e.g. invalid DSN); code refactoring moved Sentry init after first feedback submission; telemetry opt-out leaving the client absent.
Related errors
AI-assisted analysis of iOfficeAI/AionUi@711aa0550e (2026-08-28).
Data as JSON: /api/errors/f54d407b401cbaf1.
Report an issue: GitHub.