Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Upload API succeeds despite 408 Request Timeout #1541

Closed
1 of 7 tasks
SusumuKanazawa opened this issue Oct 3, 2022 · 4 comments · Fixed by #1544
Closed
1 of 7 tasks

File Upload API succeeds despite 408 Request Timeout #1541

SusumuKanazawa opened this issue Oct 3, 2022 · 4 comments · Fixed by #1544
Assignees
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:web-api applies to `@slack/web-api` server-side-issue

Comments

@SusumuKanazawa
Copy link

files.upload API successds despite 408 error.

same,
python: slackapi/python-slack-sdk#1165
java: slackapi/java-slack-sdk#1065

sample

// fileSize: 8.4MB

  async fileUpload (filePath) {
    try {
      const client = new WebClient(this.TOKEN, {
        retryConfig: { retries: 1 },
        logLevel: LogLevel.DEBUG
      })

      const file = fs.readFileSync(filePath)
      const filename = path.basename(filePath)

      await client.files.upload({
        channels: this.channelId,
        file,
        filename
      })
    } catch (e) {
      throw new Error(`upload error: ${e}`)
    }
  }

error:

[WARN]  web-api:WebClient:0 http request failed An HTTP protocol error occurred: statusCode = 408
[WARN]  web-api:WebClient:0 http request failed An HTTP protocol error occurred: statusCode = 408
upload error: Error: An HTTP protocol error occurred: statusCode = 408

// files upload complete 2 files.

Packages:

Select all that apply:

  • @slack/web-api
  • @slack/rtm-api
  • @slack/webhooks
  • @slack/oauth
  • @slack/socket-mode
  • @slack/types
  • I don't know

Reproducible in:

slack/web-api: 6.7.2
node: v16.14.0
npm: 8.3.1
Mac OS: 11.6.7

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:web-api applies to `@slack/web-api` server-side-issue and removed untriaged labels Oct 3, 2022
@seratch seratch added this to the [email protected] milestone Oct 3, 2022
@seratch
Copy link
Member

seratch commented Oct 3, 2022

Hi @SusumuKanazawa, thanks for taking the time to report this issue.

We are aware of this and are now working on the fix for it. Please refer to the pull requests adding a new way to upload files in a stable manner:

We will add the same to Node SDK sometime soon!

@SusumuKanazawa
Copy link
Author

@seratch thanks.

@srajiang
Copy link
Contributor

@SusumuKanazawa - Heads up that we have just merged support for files.uploadV2 in node-slack-sdk and its slated for release v6.8.0!

@SusumuKanazawa
Copy link
Author

@srajiang very thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:web-api applies to `@slack/web-api` server-side-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants