Skip to content

[Bug] Anthropic API Error: Image does not match provided media type #11975

@razurang

Description

@razurang

Bug Description

Playwright MCP took screenshots in png format, but while API call, it's looking for image/JPEG format, it was working before, but now it's getting this error:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","messag
e":"messages.5.content.28.image.source.base64.data: Image does not match the
provided media type image/jpeg"},"request_id":"req_011CVHseGP3vaiaFfNqeY4gQ"}

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.46
  • Feedback ID: de2e8417-f5f2-4035-ad13-183b406bfcb2

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/razu/.local/share/claude/versions/2.0.46 (expected in multi-process scenarios)\n    at aq0 (/$bunfs/root/claude:2532:1516)\n    at P4A (/$bunfs/root/claude:2532:1194)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T20:17:38.589Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/razu/.local/share/claude/versions/2.0.46 (expected in multi-process scenarios)\n    at aq0 (/$bunfs/root/claude:2532:1516)\n    at N4A (/$bunfs/root/claude:2530:12601)\n    at async tp8 (/$bunfs/root/claude:2530:13807)\n    at async Ux (/$bunfs/root/claude:2532:236)\n    at async <anonymous> (/$bunfs/root/claude:2532:12383)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T20:17:48.464Z"},{"error":"Error: Could not load the \"sharp\" module using the darwin-arm64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n    npm install --include=optional sharp\n- Ensure your package manager supports multi-platform installation:\n    See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n    npm install --os=darwin --cpu=arm64 sharp\n- Consult the installation documentation:\n    See https://sharp.pixelplumbing.com/install\n    at <anonymous> (/$bunfs/root/claude:339:36615)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:340:88)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:340:79804)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:340:80999)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T20:24:23.949Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.28.image.source.base64.data: Image does not match the provided media type image/jpeg\"},\"request_id\":\"req_011CVHseGP3vaiaFfNqeY4gQ\"}\n    at generate (/$bunfs/root/claude:390:20036)\n    at makeRequest (/$bunfs/root/claude:732:5434)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T20:24:26.333Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:mcpbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions