`slack_file` image blocks appended with `chat.appendStream` render as missing images inline
Maintainer antworten meist innerhalb von 5 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginne damit, die Sequenz mit files_upload_v2, files_info, chat_startStream, chat_appendStream und chat_stopStream unter Verwendung der aufgeführten Versionen zu reproduzieren. Vergleiche die SDK-Anfrage-Payload mit dem Verhalten der Streaming-API von Slack und stelle fest, ob der Fehler im SDK oder serverseitig liegt. Als erledigt gilt die Aufgabe, wenn die Ursache dokumentiert und ein fokussierter Regressionstest hinzugefügt wurde, falls eine SDK-seitige Änderung identifiziert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 4k
- Forks
- 860
- Ø Merge
- 3 T. 17 Std.
- Gemergte PRs (30 T.)
- 11
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus slackapi/python-slack-sdk
-
auto-triage-skip discussion
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
slackapi/python-slack-sdk#1940 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelOffenauto-triage-skip enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
slackapi/python-slack-sdk#1923 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
-
files_upload_v2 should respect the retry handlersEvtl. vergeben @DSeaStar hat das vor 62 Tagen übernommen. Offenauto-triage-skip bug python web-client
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
slackapi/python-slack-sdk#1853 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
-
auto-triage-skip bug server-side-issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
slackapi/python-slack-sdk#1847 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Proxy URL log can expose proxy credentialsEvtl. vergeben @Shubham-Padkonde hat das vor 21 Tagen übernommen. Offenauto-triage-skip needs info web-client
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 50/100
slackapi/python-slack-sdk#1826 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
Alle Issues in slackapi/python-slack-sdk
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
jbacalso24/mimry#291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
eli-alvarado/us-watchlist-alerts#14 ·
Maintainer antworten meist innerhalb von 1 Tag
-
from-review-extraction python severity:nit
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
LearningCircuit/local-deep-research#7462 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
cathrynlavery/diagram-design#441 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Cleanup] Include the public header in work_split.cppEvtl. vergeben @blozano-tt hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
tenstorrent/tt-metal#60850 ·
Maintainer antworten meist innerhalb von 1 Tag