Resolution Search
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- nextjs, react, typescript
- Domain
- ai, api, authentication, backend, search
Research direction
Start by reproducing repeated Resolution Search requests while tracing updateDrawingContext, getSystemPrompt, onSetAIState, and the Researcher image pipeline mentioned in the logs. Check the x.ai request and Vercel runtime behavior; done means searches no longer refresh, fail after the first request, return invalid-image errors, or hit the 60-second timeout.
Written by the indexing model from the issue text.
Description
Sometimes the page refreshes or sometimes only the first one works and subsequent ones are not.
Here are the error logs
2026-06-26 12:19:14.558 [error] updateDrawingContext: Invalid or missing user ID.
2026-06-26 12:19:06.562 [info] Chat DB actions loaded. Ensure getCurrentUserId() is correctly implemented for server-side usage if applicable.
2026-06-26 12:19:06.567 [error] updateDrawingContext: Invalid or missing user ID.
2026-06-26 12:18:55.374 [info] File extraction: { exists: false, name: undefined, type: undefined, size: undefined }
2026-06-26 12:18:55.374 [info] Historical messages image filter: { filteredImagesCount: 0, retainedImagesCount: 1, totalMessages: 2 }
2026-06-26 12:18:55.374 [info] messageParts structure: { parts: [ { type: 'text', length: 94 } ], hasImage: false }
2026-06-26 12:18:55.374 [info] Final content structure: {
hasImage: false,
contentType: 'string',
isArray: false,
partsCount: 'N/A'
}
2026-06-26 12:18:55.374 [error] getSystemPrompt: Error: Error: Failed query: select "system_prompt" from "users" where "users"."id" = $1 limit $2
params: anonymous,1
at g.queryWithCache (.next/server/chunks/3278.js:48:15741)
at async (.next/server/chunks/3278.js:1:46409) {
query: 'select "system_prompt" from "users" where "users"."id" = $1 limit $2',
params: [Array],
[cause]: TypeError: Cannot read properties of undefined (reading 'searchParams')
at (.next/server/chunks/3278.js:1:46627)
at g.queryWithCache (.next/server/chunks/3278.js:48:15722)
at (.next/server/chunks/3278.js:1:46586)
at Object.startActiveSpan (.next/server/chunks/3278.js:48:41089)
}
2026-06-26 12:18:55.380 [error] onSetAIState: User not authenticated. Chat not saved.
2026-06-26 12:18:55.845 [error] Error [AI_APICallError]: Downloaded response does not contain a valid JPG, PNG, WebP, or ICO image.
at (.next/server/chunks/4234.js:50:5082)
at async tn (.next/server/chunks/4234.js:50:3937)
at async ty.doGenerate (.next/server/chunks/4234.js:50:11106)
at async fn (.next/server/chunks/5070.js:108:10911)
at async (.next/server/chunks/5070.js:104:6650)
at async I1 (.next/server/chunks/5070.js:104:4465)
at async fn (.next/server/chunks/5070.js:108:10298)
at async (.next/server/chunks/5070.js:104:6650)
at async l (.next/server/chunks/5225.js:142:7501) {
cause: undefined,
url: 'https://api.x.ai/v1/chat/completions',
requestBodyValues: [Object],
statusCode: 400,
responseHeaders: [Object],
responseBody: '{"code":"invalid-argument","error":"Downloaded response does not contain a valid JPG, PNG, WebP, or ICO image."}',
isRetryable: false,
data: [Object]
}
2026-06-26 12:18:55.846 [info] Researcher - Image pipeline trace: {
hasImage: true,
totalMessages: 3,
messagesWithImages: 1,
lastUserMessageContentStructure: { type: 'string', isArray: false, parts: 'string' }
}
2026-06-26 12:18:38.350 [info] File extraction: { exists: false, name: undefined, type: undefined, size: undefined }
2026-06-26 12:18:38.351 [info] Historical messages image filter: { filteredImagesCount: 0, retainedImagesCount: 1, totalMessages: 2 }
2026-06-26 12:18:38.351 [info] messageParts structure: { parts: [ { type: 'text', length: 109 } ], hasImage: false }
2026-06-26 12:18:38.351 [info] Final content structure: {
hasImage: false,
contentType: 'string',
isArray: false,
partsCount: 'N/A'
}
2026-06-26 12:18:38.359 [error] getSystemPrompt: Error: Error: Failed query: select "system_prompt" from "users" where "users"."id" = $1 limit $2
params: anonymous,1
at g.queryWithCache (.next/server/chunks/3278.js:48:15741)
at async (.next/server/chunks/3278.js:1:46409) {
query: 'select "system_prompt" from "users" where "users"."id" = $1 limit $2',
params: [Array],
[cause]: TypeError: Cannot read properties of undefined (reading 'searchParams')
at (.next/server/chunks/3278.js:1:46627)
at g.queryWithCache (.next/server/chunks/3278.js:48:15722)
at (.next/server/chunks/3278.js:1:46586)
at Object.startActiveSpan (.next/server/chunks/3278.js:48:41089)
}
2026-06-26 12:18:38.361 [error] onSetAIState: User not authenticated. Chat not saved.
2026-06-26 12:18:38.827 [error] Error [AI_APICallError]: Downloaded response does not contain a valid JPG, PNG, WebP, or ICO image.
at (.next/server/chunks/4234.js:50:5082)
at async tn (.next/server/chunks/4234.js:50:3937)
at async ty.doGenerate (.next/server/chunks/4234.js:50:11106)
at async fn (.next/server/chunks/5070.js:108:10911)
at async (.next/server/chunks/5070.js:104:6650)
at async I1 (.next/server/chunks/5070.js:104:4465)
at async fn (.next/server/chunks/5070.js:108:10298)
at async (.next/server/chunks/5070.js:104:6650)
at async l (.next/server/chunks/5225.js:142:7501) {
cause: undefined,
url: 'https://api.x.ai/v1/chat/completions',
requestBodyValues: [Object],
statusCode: 400,
responseHeaders: [Object],
responseBody: '{"code":"invalid-argument","error":"Downloaded response does not contain a valid JPG, PNG, WebP, or ICO image."}',
isRetryable: false,
data: [Object]
}
2026-06-26 12:18:38.828 [info] Researcher - Image pipeline trace: {
hasImage: true,
totalMessages: 3,
messagesWithImages: 1,
lastUserMessageContentStructure: { type: 'string', isArray: false, parts: 'string' }
}
2026-06-26 12:19:38.336 [error] Vercel Runtime Timeout Error: Task timed out after 60 seconds
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 7
- Avg merge
- 59m
- Merged PRs (30d)
- 16
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QueueLab/QCX
-
Settings Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Collaboration Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Image preview Gen UI Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100