Skip to content

Troubleshooting ​

Exit codes ​

CodeMeaning
0Success
1Failure, or a partial result: some inputs, accounts or folders failed and everything else was committed
2Invalid arguments, or a search query with a mistake
130Stopped by Ctrl-C or a signal at a safe point; run the command again to continue
141The program reading the output stopped early, as head does in mailarc search … | head. mailarc ends quietly; this is not an error

With --json, the result goes to standard output, and an error is a JSON object with a code (and sometimes a detail) on standard error. After a Google or Microsoft sign-in failure, provider_error gives the provider's own code, such as invalid_grant AADSTS70008, which helps an administrator.

Common error codes ​

Archive ​

CodeMeaningWhat to do
archive_lockedAnother program is writing to the archive (sync, import, seal), or an app has it open while you import or syncWait until the other program ends, or close the app. A scheduled run can treat this as skipped
invalid_archive_pathThe folder is not an archive, or it contains something that does not belong, such as a link or an unexpected fileChoose the archive's own folder, the one ending in .mailarc. For a copy, delete it and copy the whole folder again
archive_pending_walA writer was interruptedRun a normal sync or import; it repairs this first
archive_needs_recoveryThe archive needs the repair a writer does on openingRun sync or import again, then verify. If it persists, mailarc rethread ARCHIVE rebuilds the catalog
archive_integrity_failedA stored message or log does not match its hashDo not write to the archive. Run verify --deep and restore from backup
unsupported_schemaThe archive is newer than this mailarc, or needs an upgradeUpdate mailarc, or upgrade the archive
unsupported_source_eventsA newer mailarc recorded accounts this version does not know, such as POP3 or JMAPUpdate mailarc

Accounts and sync ​

CodeMeaningWhat to do
credential_missingNo password or token is stored for the accountaccount edit ... --password, or account authorize
credential_store_unavailableThe keychain is locked, missing or unreachableUnlock it; for scheduled runs see Syncing
account_authentication_failedThe server rejected the user name or passwordCheck them; for Gmail use an app password
account_tls_failedThe secure connection or the server's certificate failedCheck the host name and port; mailarc never connects unencrypted
account_connection_failed, account_timeoutThe server could not be reachedCheck the network; sync retries by itself
account_source_unregisteredThe account is not recorded in the archiveaccount register
account_registration_requires_upgradeThe archive is still version 1Upgrade it
account_not_foundNo enabled account with that ID for this archiveaccount list
sync_server_throttledThe server asked to slow downNothing; sync waits and retries
sync_uidl_unsupportedThe POP3 server cannot identify messagesThis server cannot be archived over POP3
account_already_registeredThe archive already syncs this mailbox through another accountUse that account, or disable it first
oauth_reauthorization_requiredThe Google or Microsoft grant was revoked or expiredaccount authorize
oauth_access_rejectedThe provider gave a token, but the mail server refused itCheck that IMAP is enabled for the mailbox; at work, ask your administrator
oauth_consent_deniedAccess was not granted on the sign-in page, or a policy blocked itSign in again and allow access; at work, ask your administrator
oauth_wrong_accountYou signed in with another account than --usernameSign in with that account
oauth_client_rejected, oauth_client_invalidThe client ID or secret is wrongCheck the app registration
oauth_timeoutThe sign-in did not finish within 5 minutesRun the command again
oauth_provider_unavailableGoogle or Microsoft is unreachable or asked to slow downSync retries by itself; otherwise try later

Search and export ​

CodeMeaningWhat to do
index_missing, index_incompatibleNo usable search indexmailarc reindex ARCHIVE
query_*A mistake in the query, with its positionSee the syntax
search_cursor_staleThe index changed since that pageStart the search again
export_destination_existsThe export folder already existsChoose a new folder, or add --resume
export_maildir_separator_unsupported: cannot be used in file names on WindowsUse --maildir-separator semicolon

Copying and saved searches ​

CodeMeaningWhat to do
copy_requires_upgrade, saved_search_requires_upgradeThe archive copied into, or saved in, is still version 1Upgrade it
copy_same_archiveSource and destination are the same archiveChoose another destination
copy_destination_invalidThe folder chosen is not a mailarc archiveChoose the archive's folder, the one ending in .mailarc
copy_runningA copy is reading this archive, so the desktop app does not write to itWait for the copy, or stop it
copy_message_missingA selected message is no longer in the sourceNothing; the rest is copied
saved_search_name_takenA saved search in the same place has this nameChoose another name

Getting more detail ​

  • --progress shows what sync, import and reindex are doing.
  • Protocol traces for diagnosing a server. They hide passwords and message content, but show folder names, so keep them private:
    • MAILARC_IMAP_TRACE=1 writes the IMAP conversation to standard error;
    • MAILARC_POP3_TRACE=1 does the same for POP3;
    • MAILARC_JMAP_TRACE=1 lists the JMAP requests.
  • MAILARC_DEBUG_ARCHIVE=1 names the operation when an archive write fails.