Foundry376/Mailspring · error

Thread not found

Error message

Thread not found

What it means

Guard in the thread-permalink IPC handler: a mailspring://thread permalink opened from the web (subject + timestamp window parsed from the URL) matched no thread in the local database. The thread either belongs to another machine/account or falls outside the lastMessageReceivedTimestamp epsilon window used to match it.

Source

Thrown at app/internal_packages/thread-list/lib/thread-permalink-handler.ts:56

        new Matcher.And([
          Thread.attributes.lastMessageReceivedTimestamp.lessThan(lastDate + dateEpsilon),
          Thread.attributes.lastMessageReceivedTimestamp.greaterThan(lastDate - dateEpsilon),
        ]),
      ]);

  return DatabaseStore.findBy<Thread>(Thread).where([
    Thread.attributes.subject.equal(subject),
    dateClause,
  ]);
};

const _onOpenThreadFromWeb = (event: Electron.IpcRendererEvent, mailspringUrl: string) => {
  const params = _parseOpenThreadUrl(mailspringUrl);

  _findCorrespondingThread(params)
    .then((thread) => {
      if (!thread) {
        throw new Error('Thread not found');
      }
      Actions.popoutThread(thread);
    })
    .catch((error) => {
      AppEnv.reportError(error);
      AppEnv.showErrorDialog(
        localized(`The thread %@ does not exist in your mailbox!`, params.subject)
      );
    });
};

export function activate() {
  ipcRenderer.on('openThreadFromWeb', _onOpenThreadFromWeb);
}

View on GitHub (pinned to 648c685d60)

Solutions

  1. Notify the user that the thread isn't available on this device and optionally open a search for the subject
  2. Widen the date epsilon used in _findCorrespondingThread if permails from cross-timezone clients fail to match
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at app/internal_packages/thread-list/lib/thread-permalink-handler.ts:56 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Foundry376/Mailspring@648c685d60 (2026-09-03). Data as JSON: /api/errors/fbf4fa0cd0bc4d8e. Report an issue: GitHub.