fob-mail Troubleshooting
fob-mail prints Error: <message> on stderr, a next step on the line below, and exits with
code 1. Each heading here is the message as printed. Set FOB_DEBUG=1 to print the stack trace
as well.
No Mail profile selected
Error: No Mail profile selected. Run `fob-mail config profiles add <name>`, then `fob-mail config profiles use <name>` (or pass --profile <name>).
No profile is configured, or none is current. Run fob-mail getting-started for the steps, or
add one as in Setup. If profiles exist, fob-mail config profiles list shows
them and fob-mail config profiles use <name> picks one.
Profile 'acme' is not configured
Error: Profile 'acme' is not configured. Run `fob-mail config profiles add acme`.
--profile (or --org) names a profile that doesn't exist on this machine. Check the spelling
with fob-mail config profiles list, or add it.
Invalid API credentials
Error: Invalid API credentials
Also Missing API credentials and API key expired. The key or secret is wrong, or the key was
revoked or has expired. Check which profile is in use with fob-mail config profiles current. A
firm admin can create a new key in Mail (Settings → API keys); add it again with
fob-mail config profiles add <name>, which updates the existing profile.
API key lacks threads:read permission
Error: API key lacks threads:read permission
The key's preset doesn't allow that command. The message names what's missing:
| Missing | Needed for | Preset that has it |
|---|---|---|
threads:edit, labels:create | threads edit, labels create | Read and label |
messages:create | threads reply, messages send | Read, label and send |
any :read | reading | Read only, or higher |
A firm admin creates a key with the right preset in Mail: Settings → API keys.
Thread not found
Error: Thread not found
Also Mailbox not found, Message not found or Attachment not found. The id is wrong, or it belongs to a
mailbox this key may not use. fob-mail mailboxes list shows the mailboxes the key has.
Replies can only be sent from connected Google mailboxes for now
Error: Replies can only be sent from connected Google mailboxes for now
For messages send it starts Mail can only be sent …. Mail sends only from Google mailboxes
connected with Google sign-in. Mailboxes connected another way, such as over IMAP, can be read
but not sent from yet.
fob-mail mailboxes list shows SEND yes for the mailboxes that can send.
This mailbox is disconnected
Error: This mailbox is disconnected. Reconnect it to reply.
Also The mailbox needs reconnecting: … when the client's sign-in stopped working. A firm admin
reconnects the mailbox in Mail (Settings → Mailboxes), then you run the same command again.
Gmail refused the send
Code SEND_REFUSED: the message is Gmail's own, and nothing was sent. Fix the cause it names
(an invalid recipient, say), then run the same command again. Reusing the same idempotency key is
safe.
The send status is pending
Not an error, but the one result that needs a person:
(Gmail's answer was lost, so it may or may not have gone out. Check the client's Sent folder before sending it again with a new --idempotency-key.)
Running the same command again returns the same pending result and sends nothing. Look in the
client's Sent folder. Only if it isn't there, send again with a new --idempotency-key.
Related
- Error Codes: every API error code
- Setup
- Use with AI agents