claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Invalid String Length in Socket Stream Processing

Open tumma72 opened this issue 7 months ago • 1 comments

Bug Description While running and attempting to fix a bug Claude exited with the following error:
RangeError: Invalid string length at Socket. (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:27881) at Socket.emit (node:events:507:28) at Socket.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Environment Info

  • Platform: macos
  • Terminal: cursor
  • Version: 1.0.2
  • Feedback ID: db1fc9d6-25c6-44e7-b3de-f663181ebd5d

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at cG (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:3513)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:15313\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:13335)\n    at oR1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:14562)\n    at aI (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:14179)\n    at JU2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2061:20995)","timestamp":"2025-05-23T13:47:14.947Z"}]

tumma72 avatar May 23 '25 13:05 tumma72

Duplicate: https://github.com/anthropics/claude-code/issues/962

slhck avatar Jun 13 '25 08:06 slhck

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

Yes it isn't any longer happening with version 2.0*

tumma72 avatar Oct 10 '25 10:10 tumma72

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Oct 17 '25 14:10 github-actions[bot]