chatboxai/chatbox · error · Error
document_parser_not_configured
Error message
document_parser_not_configured
What it means
Thrown in preprocessFile when the file is not a text file (isTextFilePath false) and getEffectiveDocumentParserConfig().type === 'none'. It is the explicit 'user disabled all document parsing' branch — non-text attachments cannot be processed because no parser is configured.
Source
Thrown at src/renderer/stores/sessionHelpers.ts:641
rawStorageKey: rawKey,
ragMode: 'inline',
parserType: 'sandbox-raw',
}
}
stage = 'parse'
if (isTextFilePath(file.name)) {
log.debug(`Text file detected, using local parser: ${file.name}`)
result = await parseFileWithLocalFallback(file, uniqKey, {
allowChatboxAIFallback: options?.source !== 'pasted-text',
})
} else {
const parserConfig = getEffectiveDocumentParserConfig()
log.debug(`Using document parser: ${parserConfig.type} for file: ${file.name}`)
switch (parserConfig.type) {
case 'none': {
throw new Error('document_parser_not_configured')
}
case 'local': {
result = await parseFileWithLocalFallback(file, uniqKey)
break
}
case 'chatbox-ai': {
result = await parseFileWithLocalFallback(file, uniqKey, { forceChatboxAIFallback: true })
break
}
case 'mineru': {
const apiToken = parserConfig.mineru?.apiToken
if (!apiToken) {
throw new Error('mineru_api_token_required')
}
try {View on GitHub (pinned to 81571269ad)
Solutions
- Open Settings → Document Parser and select 'local', 'chatbox-ai', or 'mineru' before attaching non-text files.
- Convert the attachment to a plain-text/Markdown file (isTextFilePath returns true) so it bypasses the parser switch entirely.
- If shipping a default config, set parserConfig.type to a build-supported default rather than 'none' so users aren't blocked on first attach.
- In the UI, disable the attach-button for non-text files when parserConfig.type === 'none' so the user gets guidance instead of a thrown error.
Example fix
// before
case 'none': {
throw new Error('document_parser_not_configured')
}
// after — fall back to the local parser so attachment still works
case 'none': {
result = await parseFileWithLocalFallback(file, uniqKey)
break
} Defensive patterns
Strategy: validation
Validate before calling
// Validate the parser config before attaching a non-text file.
function assertParserConfigured(file: File, cfg: { type: string }): void {
if (!isTextFilePath(file.name) && cfg.type === 'none') {
throw new Error('Set a document parser in Settings before attaching non-text files.')
}
} Type guard
function isDocumentParserConfigured(cfg: { type: string }): boolean {
return cfg.type !== 'none' && ['local','chatbox-ai','mineru'].includes(cfg.type)
} Try / catch
try {
await preprocessFile(file)
} catch (e) {
if (e instanceof Error && e.message === 'document_parser_not_configured') {
promptUserToConfigureParser()
return
}
throw e
} Prevention
- Default parserConfig.type to a build-supported value ('local') instead of 'none' on fresh installs.
- Disable the attach button for non-text files when parserConfig.type === 'none'.
- Run a settings-migration step on upgrade that converts legacy 'none' configs to a working default.
When it happens
Trigger: User attached a binary document (PDF, DOCX, etc.) while the document-parser setting is 'none'. The switch dispatches on parserConfig.type and the 'none' case throws before any parser is invoked. The same string is reused in the default case (227) for unknown types.
Common situations: Fresh install where the parser defaults to 'none'; user manually turned off document parsing to save bandwidth; a config import/set-defaults call wrote type:'none'; group policy disabled cloud parsers and the local parser was unset, leaving 'none'.
Related errors
- mineru_api_token_required
- Custom provider "${providerId}" conflicts with a builtin pro
- Unknown transport type
- Unsupported search provider: ${provider}
- third_party_parser_not_supported_in_chat
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/4056030b7049a799.
Report an issue: GitHub.