Skip to content

The socket connection was closed unexpectedly on lark v1.60.0 & bun #186

@seepine

Description

@seepine
  • bun v1.3.11
  • lark v1.60.0
import { join, basename } from 'node:path'
import { createReadStream } from 'node:fs'

        const resp = await this.client.im.v1.file.create({
          data: {
            file_type: 'stream',
            file_name: basename(filepath),
            file: createReadStream(filepath),
          },
        })

The Error log

Error: {
            "message": "The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()",
            "name": "Error",
            "stack": "Error: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()
    at from (/Users/seepine/workspace/seepine/manbot/node_modules/axios/dist/node/axios.cjs:962:28)
    at handleRequestError (/Users/seepine/workspace/seepine/manbot/node_modules/axios/dist/node/axios.cjs:3794:29)\n    at emitError (node:events:43:23)
    at <anonymous> (/Users/seepine/workspace/seepine/manbot/node_modules/follow-redirects/index.js:49:24)
    at emitError (node:events:43:23)
    at <anonymous> (node:_http_client:253:22)
    at processTicksAndRejections (native:7:39)
    at request (/Users/seepine/workspace/seepine/manbot/node_modules/axios/dist/node/axios.cjs:5110:41)
    at processTicksAndRejections (native:7:39)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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