question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

files_upload API - timeout response by server regardless of timeout value passed to web client

See original GitHub issue

Hi, I have this little snippet of code that used to work for me until recently:

slackClient=slack_sdk.WebClient(token=slackToken, timeout=300)
upload = slackClient.files_upload(file=file, filename=file)

now I am suddenly getting this response: slack_sdk.errors.SlackApiError: Received a response in a non-JSON format: stream timeout The server responded with: {'status': 408, 'headers': {'x-edge-backend': 'envoy-www', 'content-length': '14', 'content-type': 'text/plain', 'x-slack-edge-shared-secret-outcome': 'no-match', 'date': 'Tue, 18 Jan 2022 08:12:58 GMT', 'server': 'envoy', 'via': 'envoy-edge-fra-f6ad', 'connection': 'close'}, 'body': 'stream timeout'}

it seems like the client or server are not considering the timeout parameter that is passed to the WebClient, this response returns exactly 30 seconds after the request initiated, as well as when testing it with a smaller file that takes less than 30 seconds to upload everything works fine

since no changes were made to the code, and the slack_sdk was not updated, I am assuming it is related to a server issue? can any one shed some more information regarding this issue?

using python slack-sdk version 3.13.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
artemiv4novcommented, Mar 29, 2022

Hello! How you guys could break your the one API version? We are facing exactly the same problem with the file upload. We tried to rollback to the previous API version but there is no API versioning at all. What you should do in my opinion: – fix the file upload ASAP – implement the API versioning and do not break the current API version because millions of users have to watch how you test your new API implementation on the production stand.

You are a respectful company, please keep the level on not below your “honor” waterline. 💪🏼

4reactions
admitrevskiycommented, Mar 25, 2022

We are facing the same problem.

When uploading a 40 MB file, an error ‘stream timeout’ appears and increasing the timeout does not help.

The funny thing is, the file appears in the slack channel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uploading file to Web API timeouts on the server
I've been having this problem all day, and i'm pretty lost as to why it happens. I'm posting a file (a .xls file)...
Read more >
How to Troubleshoot DNS Errors (Timeouts, Codes & More)
Learn how to troubleshoot DNS errors such as timeouts, codes, and more. Answer the question of what is a DNS error and why...
Read more >
Configuration Reference Red Hat OpenStack Platform 11
(Boolean) Return server tracebacks in the API response for any error responses. ... If the timeout is reached the node will be put...
Read more >
API Reference — Bottle 0.13-dev documentation
(default: False); options – Options passed to the server adapter. ... REQUEST_TIMEOUT: 408>: 'Request Timeout', <HTTPStatus.CONFLICT: 409>: 'Conflict' ...
Read more >
34.4 Using the Timer Service - Java Platform, Enterprise Edition
In other words, remote clients and web service clients cannot access a bean's TimerHandle ... GlassFish Server has a default minimum timeout value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found