CherryHQ/cherry-studio · error · Error
Image transport returned a task id but does not implement po
Error message
Image transport returned a task id but does not implement polling
What it means
Error "Image transport returned a task id but does not implement polling" thrown in CherryHQ/cherry-studio.
Source
Thrown at src/main/ai/provider/custom/tasks/imageGenerationJobHandler.ts:177
}
}
async function readImageFile(fileId: string): Promise<ImageModelV3File> {
const { content, mime } = await application.get('FileManager').read(fileId, { encoding: 'base64' })
return { type: 'file', mediaType: mime, data: content }
}
/**
* Run the transport's poll loop, cancelling the remote task on job abort.
* Mirrors the abort handling in `imageGenerationModel.doGenerate`.
*/
async function pollUntilDone(
transport: ImageGenerationTransport,
taskId: string,
ctx: JobContext<ImageGenerationJobPayload>
): Promise<string[]> {
if (!transport.poll) {
throw new Error('Image transport returned a task id but does not implement polling')
}
const cancelRemote = transport.cancel ? () => void transport.cancel?.(taskId).catch(() => {}) : undefined
if (cancelRemote) {
if (ctx.signal.aborted) {
cancelRemote()
throw createAbortError('Image generation aborted')
}
ctx.signal.addEventListener('abort', cancelRemote, { once: true })
}
try {
return await transport.poll(taskId, {
signal: ctx.signal,
onProgress: (progress) => ctx.reportProgress(progress, { stage: 'polling' }),
// Carry the descriptor so the poll rebuilds per-task state on a transport
// instance that did not run the submit (DashScope's response family).
modelDescriptor: ctx.input.modelDescriptor
})
} finally {View on GitHub (pinned to 726446b54c)
Solutions
- Implement the polling method on the image transport, or return imageUrls synchronously instead of a task id.
- Check that the correct transport class is registered for this provider — a base class lacking pollTask may be in use.
Example fix
Add pollTask(taskId) to the provider's transport class so the job handler can await completion of async tasks.
When it happens
Trigger: A transport's submit() returns a taskId but the transport object does not implement the poll() method needed to follow the async task.
Common situations: Indicates a wiring defect: a provider implemented async submit without polling (or the wrong transport was resolved for the model). The job fails fast instead of hanging or dropping the remote task.
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/3d32f2eecf0e7659.
Report an issue: GitHub.