Troubleshooting
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Failure, or a partial result: some inputs, accounts or folders failed and everything else was committed |
| 2 | Invalid arguments, or a search query with a mistake |
| 130 | Stopped by Ctrl-C or a signal at a safe point; run the command again to continue |
| 141 | The 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
| Code | Meaning | What to do |
|---|---|---|
archive_locked | Another program is writing to the archive (sync, import, seal), or an app has it open while you import or sync | Wait until the other program ends, or close the app. A scheduled run can treat this as skipped |
invalid_archive_path | The folder is not an archive, or it contains something that does not belong, such as a link or an unexpected file | Choose the archive's own folder, the one ending in .mailarc. For a copy, delete it and copy the whole folder again |
archive_pending_wal | A writer was interrupted | Run a normal sync or import; it repairs this first |
archive_needs_recovery | The archive needs the repair a writer does on opening | Run sync or import again, then verify. If it persists, mailarc rethread ARCHIVE rebuilds the catalog |
archive_integrity_failed | A stored message or log does not match its hash | Do not write to the archive. Run verify --deep and restore from backup |
unsupported_schema | The archive is newer than this mailarc, or needs an upgrade | Update mailarc, or upgrade the archive |
unsupported_source_events | A newer mailarc recorded accounts this version does not know, such as POP3 or JMAP | Update mailarc |
Accounts and sync
| Code | Meaning | What to do |
|---|---|---|
credential_missing | No password or token is stored for the account | account edit ... --password, or account authorize |
credential_store_unavailable | The keychain is locked, missing or unreachable | Unlock it; for scheduled runs see Syncing |
account_authentication_failed | The server rejected the user name or password | Check them; for Gmail use an app password |
account_tls_failed | The secure connection or the server's certificate failed | Check the host name and port; mailarc never connects unencrypted |
account_connection_failed, account_timeout | The server could not be reached | Check the network; sync retries by itself |
account_source_unregistered | The account is not recorded in the archive | account register |
account_registration_requires_upgrade | The archive is still version 1 | Upgrade it |
account_not_found | No enabled account with that ID for this archive | account list |
sync_server_throttled | The server asked to slow down | Nothing; sync waits and retries |
sync_uidl_unsupported | The POP3 server cannot identify messages | This server cannot be archived over POP3 |
account_already_registered | The archive already syncs this mailbox through another account | Use that account, or disable it first |
oauth_reauthorization_required | The Google or Microsoft grant was revoked or expired | account authorize |
oauth_access_rejected | The provider gave a token, but the mail server refused it | Check that IMAP is enabled for the mailbox; at work, ask your administrator |
oauth_consent_denied | Access was not granted on the sign-in page, or a policy blocked it | Sign in again and allow access; at work, ask your administrator |
oauth_wrong_account | You signed in with another account than --username | Sign in with that account |
oauth_client_rejected, oauth_client_invalid | The client ID or secret is wrong | Check the app registration |
oauth_timeout | The sign-in did not finish within 5 minutes | Run the command again |
oauth_provider_unavailable | Google or Microsoft is unreachable or asked to slow down | Sync retries by itself; otherwise try later |
Search and export
| Code | Meaning | What to do |
|---|---|---|
index_missing, index_incompatible | No usable search index | mailarc reindex ARCHIVE |
query_* | A mistake in the query, with its position | See the syntax |
search_cursor_stale | The index changed since that page | Start the search again |
export_destination_exists | The export folder already exists | Choose a new folder, or add --resume |
export_maildir_separator_unsupported | : cannot be used in file names on Windows | Use --maildir-separator semicolon |
Copying and saved searches
| Code | Meaning | What to do |
|---|---|---|
copy_requires_upgrade, saved_search_requires_upgrade | The archive copied into, or saved in, is still version 1 | Upgrade it |
copy_same_archive | Source and destination are the same archive | Choose another destination |
copy_destination_invalid | The folder chosen is not a mailarc archive | Choose the archive's folder, the one ending in .mailarc |
copy_running | A copy is reading this archive, so the desktop app does not write to it | Wait for the copy, or stop it |
copy_message_missing | A selected message is no longer in the source | Nothing; the rest is copied |
saved_search_name_taken | A saved search in the same place has this name | Choose another name |
Getting more detail
--progressshows 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=1writes the IMAP conversation to standard error;MAILARC_POP3_TRACE=1does the same for POP3;MAILARC_JMAP_TRACE=1lists the JMAP requests.
MAILARC_DEBUG_ARCHIVE=1names the operation when an archive write fails.