Resolution Search
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 7
- Avg merge
- 59m
- Merged PRs (30d)
- 16
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
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.
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.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- ai, api, authentication, backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100