`slack_file` image blocks appended with `chat.appendStream` render as missing images inline
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo la sequenza con files_upload_v2, files_info, chat_startStream, chat_appendStream e chat_stopStream usando le versioni indicate. Confronta il payload della richiesta dell'SDK con il comportamento dell'API di streaming di Slack e determina se il problema si trova nell'SDK o lato server. Il lavoro è completato quando la causa è documentata e viene aggiunto un test di regressione mirato se viene identificata una modifica lato SDK.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
When an image block referencing a Slack-hosted file is appended to a streaming message using chat.appendStream, Slack initially renders a missing-image placeholder.
Clicking the missing image opens and displays the correct image, which indicates that:
- The file ID is valid.
- The upload completed successfully.
- Slack generated the image thumbnail.
- The original image remains accessible.
The same streamed message's DOM contains a valid Slack thumbnail URL, but Slack replaces the inline background image with an unable-to-load-error asset.
This may be a server-side file-sharing/association issue specific to blocks appended through the streaming APIs.
Reproducible in:
The Slack SDK version
3.43.0
Bot scopes:
chat:writefiles:readfiles:write
Python runtime version
3.13.7
OS info
ProductName: macOS
ProductVersion: 26.6.2
BuildVersion: 25G83
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., pyproject.toml))
- Upload a PNG to Slack without posting a separate file message:
upload_response = await client.files_upload_v2(
content=png_bytes,
filename="sample.png",
)
file_id = upload_response["file"]["id"]
- Wait until files.info reports that the image and its thumbnail are ready:
file_info = await client.files_info(file=file_id)
file = file_info["file"]
assert file["mimetype"] == "image/png"
assert file["filetype"] == "png"
assert file["thumb_360"]
assert file["thumb_360_w"]
assert file["thumb_360_h"]
- Start a streaming message:
response = await client.chat_startStream(
channel=channel_id,
thread_ts=thread_ts,
)
stream_ts = response["ts"]
- Append an image block using the Slack file ID:
await client.chat_appendStream(
channel=channel_id,
ts=stream_ts,
chunks=[
{
"type": "blocks",
"blocks": [
{
"type": "image",
"slack_file": {
"id": file_id,
},
"alt_text": "Sample Image",
}
],
}
],
)
- Stop the stream:
await client.chat_stopStream(
channel=channel_id,
ts=stream_ts,
)
Expected result:
The Slack-hosted image should render inline in the completed streaming message.
Actual result:
Slack renders a missing-image placeholder.
Clicking the placeholder opens and displays the correct image.
Inspecting the rendered HTML shows that Slack resolved the file to a generated thumbnail URL:
<a
class="c-link c-message_attachment__image"
href="https://files.slack.com/files-tmb/.../chart_480.png"
style="
background-image:
url('https://a.slack-edge.com/.../unable-to-load-error-....png');
"
>
<span role="img" aria-label="missing image"></span>
</a>
The href points to the generated Slack thumbnail, while the inline background is replaced with Slack's unable-to-load-error image.
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
- Lingua principale
- Python
- Stelle
- 4k
- Fork
- 857
- Merge medio
- 22h 21m
- PR unite (30g)
- 16
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di slackapi/python-slack-sdk
-
Use logger.isEnabledFor(logging.DEBUG) instead of logger.level <= logging.DEBUG for debug guards Apertaauto-triage-skip bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
slackapi/python-slack-sdk#1957 ·
-
auto-triage-skip discussion
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
slackapi/python-slack-sdk#1940 · 2 commenti ·
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channel Apertaauto-triage-skip enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
slackapi/python-slack-sdk#1923 · 2 commenti ·
-
SocketModeClient.connect() retries forever against a permanently closed aiohttp ClientSession Apertaauto-triage-skip bug socket-mode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
slackapi/python-slack-sdk#1922 · 2 commenti ·
-
auto-triage-skip bug python web-client
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
slackapi/python-slack-sdk#1853 · 2 commenti ·
Tutte le issue di slackapi/python-slack-sdk
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100