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

files.upload method returns warning message "files.upload may cause some issues like timeouts for relatively large files." #1752

Closed
RyokoKassai opened this issue Feb 29, 2024 · 4 comments
Labels
auto-triage-stale pkg:web-api applies to `@slack/web-api` question M-T: User needs support to use the project

Comments

@RyokoKassai
Copy link

RyokoKassai commented Feb 29, 2024

I've been using the files.upload API to upload files, but I'm receiving warning messages. Could you provide more details about the warning?

■[WARN] bolt-app "files.upload may cause some issues like timeouts for relatively large files."

I understand that the wrapper function files.uploadV2 is available, but I would like to know the potential risks of continuing to use the Files.upload method as it is.
Here is my question.

  1. Is the warning being triggered because a certain threshold has been exceeded, or does it always appear when the API is called?
  2. What is the threshold for triggering the warning? Is it related to file size or processing time?
  3. What is the threshold for the timeout? Is it related to file size or processing time?

Reproducible in:

The Slack SDK version

"slack/bolt": "^3.17.1"

Node.js runtime version

v20.11.0

OS info

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/suppor

Steps to reproduce:

let outputfile = 'out_20240220121212111.xlsx';   // 11MB file
await client.files.upload({
  channels: 'C04S3M736R3',
  initial_comment: 'Here is your file.',
  file: fs.createReadStream('./' + outputfile),
  filename: outputfile,
  filetype: 'xlsx'
})

Expected result:

No warning message

Actual result:

I'm receiving warning messages.
"files.upload may cause some issues like timeouts for relatively large files."
filesupload_WARN

Requirements

@zimeg
Copy link
Member

zimeg commented Feb 29, 2024

Hey @RyokoKassai 👋 This warning actually originates from the @slack/web-api package, so going to first move the issue!

@zimeg zimeg pinned this issue Feb 29, 2024
@zimeg zimeg unpinned this issue Feb 29, 2024
@zimeg zimeg transferred this issue from slackapi/bolt-js Feb 29, 2024
@zimeg zimeg added question M-T: User needs support to use the project pkg:web-api applies to `@slack/web-api` and removed untriaged labels Feb 29, 2024
@zimeg
Copy link
Member

zimeg commented Feb 29, 2024

Oops! Didn't mean to pin. My screen jumped right before clicking "Transfer issue"... But regardles, this warning is hardcoded into SDK for uses of files.upload to encourage using the files.uploadV2 method instead.

Timeout errors were fairly common when uploading larger files with files.upload so a backend change was made to expose new endpoints for uploading files and this method was created in the SDK. As I understand, there's no absolute reason for why these uploads were failing but it was most common with larger files.

The files.uploadV2 method offers much more stability by using a dedicated endpoint for each file upload and should resolve the timeout issues from files.upload. Hopefully this clears a bit up, but I'm also curious if you have any interest in sticking with files.upload?

Copy link

github-actions bot commented Apr 8, 2024

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

Copy link

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-stale pkg:web-api applies to `@slack/web-api` question M-T: User needs support to use the project
Projects
None yet
Development

No branches or pull requests

2 participants