infiniflow/ragflow · error · Error
message.compileNotSupported
Error message
message.compileNotSupported
What it means
After creds exist, validation requires a primary admin email for delegated Drive API calls; _primary_admin_email is only set inside load_credentials from the credential JSON. None here means creds were loaded through a path that skipped that assignment (or load_credentials never ran to completion).
Source
Thrown at web/src/hooks/use-dataset-generate.ts:205
const queryClient = useQueryClient();
const { id } = useParams();
const { handleUnbindTask } = useUnBindTask();
const { t } = useTranslation();
const {
data,
isPending: loading,
mutateAsync,
} = useMutation({
mutationKey: [DatasetKey.generate],
mutationFn: async ({ type }: { type: GenerateType }) => {
// Go/hybrid: dataset compilation is driven automatically by the scheduler
// on document completion; there is no manual RunIndex trigger, so a manual
// "generate" must NOT pretend to succeed. The UI hides/disables the
// control; if it is ever invoked, reject loudly so callers don't mistake
// it for a real run (plan v4.1 §4.2).
if (isGoDatasetBackend()) {
throw new Error(t('message.compileNotSupported'));
}
const { data } = await runIndex(id!, TraceTypeMap[type]);
if (data.code === 0) {
message.success(t('message.operated'));
queryClient.invalidateQueries({
queryKey: DatasetGenerateKeys.traceById(type, id),
});
}
return data;
},
});
const { mutateAsync: pauseGenerate } = useMutation({
mutationKey: [DatasetKey.pauseGenerate],
mutationFn: async ({
task_id,
type,
}: {View on GitHub (pinned to 554fb1133a)
Solutions
- Re-run the full load_credentials() with a payload containing the primary admin key (see error 627)
- If subclassing or patching, set both _creds and _primary_admin_email
- Validate the credential JSON shape before handing it to the connector
Example fix
# before (test hack)
connector._creds = mocked_creds
connector.validate_connector_settings() # boom: admin email None
# after
connector.load_credentials({**token_payload, "primary_admin_email": "admin@acme.com"})
connector.validate_connector_settings() Defensive patterns
Strategy: validation
Validate before calling
def admin_email_loaded(connector) -> bool:
return connector._primary_admin_email is not None Try / catch
from common.data_source.exceptions import ConnectorValidationError
try:
connector.validate_connector_settings()
except ConnectorValidationError as e:
if "primary_admin_email" in str(e).lower() or "DB_CREDENTIALS_PRIMARY_ADMIN_KEY" in str(e):
connector.load_credentials({**raw_creds, "primary_admin_email": fetch_admin_email()})
connector.validate_connector_settings() Prevention
- Don't monkey-patch _creds in tests; go through load_credentials
- Assert both _creds and _primary_admin_email in custom subclasses after load
- Lint credential payloads for null values before use
When it happens
Trigger: load_credentials() raised before assigning _primary_admin_email (missing key → ValueError) but a partial state persisted, custom code assigning _creds manually, or a credentials payload where the key mapped to None.
Common situations: Custom tests monkey-patching _creds, subclasses overriding load_credentials without setting the admin email, credential dicts built with null values.
Related errors
- main() returned a non-JSON-serializable value.
- main() must return a value. Use null for an empty result.
- Failed to fetch memory detail
- Failed to update memory
- Failed to fetch search detail
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/35552f897be8de0b.
Report an issue: GitHub.