deepseek-ai/deepseek-harness · error

${result.error.code}: ${result.error.message}

Error message

${result.error.code}: ${result.error.message}

What it means

resolveImage() loads one historical, session-authorized image via session.readAttachment and caches the resulting object URL. A non-ok readAttachment result throws the bare '<code>: <message>' — note the sibling guards in the same chain carry the conversation.resolveImage prefix (unknown session, disposed service, released generation scope); this arm is the host-side read failure itself.

Source

Thrown at packages/client/ui-conversation/src/client/service.ts:246

  /**
   * Resolve and cache one session-authorized historical image URL.
   * @param sessionId - owning session authorization scope.
   * @param attachment - durable image reference.
   * @returns browser URL valid until its rendered session is released.
   */
  resolveImage(sessionId: SessionId, attachment: ImageAttachmentRef): Promise<string> {
    if (this.disposed) return Promise.reject(new Error('conversation.resolveImage: service is disposed'))
    const key = `${sessionId}:${attachment.attachmentId}`
    const cached = this.imageUrls.get(key)
    if (cached !== undefined) return cached.pending
    const generation = this.imageGenerations.get(sessionId) ?? 0
    const session = this.requireSessions().binding(sessionId)?.session
    if (session === undefined) {
      return Promise.reject(new Error(`conversation.resolveImage: unknown session "${sessionId}"`))
    }
    const pending = session.readAttachment(attachment.attachmentId)
      .then((result) => {
        if (!result.ok) throw new Error(`${result.error.code}: ${result.error.message}`)
        if (this.disposed) throw new Error('conversation.resolveImage: service was disposed before loading completed')
        if ((this.imageGenerations.get(sessionId) ?? 0) !== generation) {
          throw new Error('historical image scope was released before loading completed')
        }
        if (typeof URL.createObjectURL !== 'function') {
          return `data:${result.value.attachment.mediaType};base64,${bytesToBase64(result.value.data)}`
        }
        const bytes = Uint8Array.from(result.value.data)
        const url = URL.createObjectURL(new Blob([bytes.buffer], { type: result.value.attachment.mediaType }))
        this.createdImageUrls.add(url)
        return url
      })
      .catch((error: unknown) => {
        if (this.imageUrls.get(key)?.generation === generation) this.imageUrls.delete(key)
        throw error
      })
    this.imageUrls.set(key, { sessionId, generation, pending })
    return pending

View on GitHub (pinned to b150a551b8)

Solutions

  1. Retry once after a reconnect for transient transport codes
  2. Treat persistent not-found codes as a broken image and render a placeholder instead of failing the transcript
  3. Verify the attachmentId comes from the current session event stream rather than a stale cache
Defensive patterns

Strategy: fallback

Try / catch

let url: string
try {
  url = await service.resolveImage(sessionId, ref)
} catch {
  url = PLACEHOLDER_URL // broken-image affordance instead of a failed transcript
}

Prevention

When it happens

Trigger: Rendering an old transcript image whose attachmentId the host no longer serves (pruned session log or retention window), an authorization scope that does not cover the attachment, or a transport error during the read.

Common situations: Scrolling deep history past the host's retention; a reconnect landing on a different session generation; the attachment deleted or re-keyed server-side.

Related errors


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/b6fc36d293cee96c. Report an issue: GitHub.