René's URL Explorer Experiment


Title: Assistant listener middleware crashes when given a plain function · Issue #1597 · slackapi/bolt-python · GitHub

Open Graph Title: Assistant listener middleware crashes when given a plain function · Issue #1597 · slackapi/bolt-python

X Title: Assistant listener middleware crashes when given a plain function · Issue #1597 · slackapi/bolt-python

Description: Reproducible in: The slack_bolt version slack_bolt==1.30.0 slack_sdk==3.45.0 Python runtime version Python 3.12.5 OS info macOS 27.0 Steps to reproduce: Pass a plain function as listener middleware on an Assistant listener. from slack_bo...

Open Graph Description: Reproducible in: The slack_bolt version slack_bolt==1.30.0 slack_sdk==3.45.0 Python runtime version Python 3.12.5 OS info macOS 27.0 Steps to reproduce: Pass a plain function as listener middleware...

X Description: Reproducible in: The slack_bolt version slack_bolt==1.30.0 slack_sdk==3.45.0 Python runtime version Python 3.12.5 OS info macOS 27.0 Steps to reproduce: Pass a plain function as listener middleware...

Opengraph URL: https://github.com/slackapi/bolt-python/issues/1597

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assistant listener middleware crashes when given a plain function","articleBody":"### Reproducible in:\n\n#### The `slack_bolt` version\n\n```\nslack_bolt==1.30.0\nslack_sdk==3.45.0\n```\n\n#### Python runtime version\n\n```\nPython 3.12.5\n```\n\n#### OS info\n\n```\nmacOS 27.0\n```\n\n#### Steps to reproduce:\n\nPass a plain function as listener middleware on an `Assistant` listener.\n\n```python\nfrom slack_bolt import App, Assistant\n\napp = App(token=\"xoxb-...\", signing_secret=\"secret\")\nassistant = Assistant()\n\ndef my_middleware(next):\n    next()\n\n@assistant.user_message(middleware=[my_middleware])\ndef handle(say):\n    say(\"hi\")\n\napp.use(assistant)\n```\n\n1. Register the listener above.\n2. Send a user message in an assistant thread.\n\n### Expected result:\n\nThe function is accepted as middleware, the same way `@app.event(..., middleware=[my_middleware])` accepts it.\n\n### Actual result:\n\nEvery matching event fails with `AttributeError: 'function' object has no attribute 'process'`.\n\n`Assistant.build_listener` in `slack_bolt/middleware/assistant/assistant.py` (and `AsyncAssistant` in `async_assistant.py`) treats every item in `middleware` as a `Middleware` instance. `App` wraps plain functions in `CustomMiddleware`, but the assistant does not. It also calls `middleware.insert(0, ...)` on the list the caller passed in, so the caller's list is changed.\n\nI have a fix with sync and async tests in #1591.\n\n## Requirements\n\nI have read the Contributing guidelines and Code of Conduct.\n","author":{"url":"https://github.com/sahiljagtap08","@type":"Person","name":"sahiljagtap08"},"datePublished":"2026-10-09T18:05:59Z","url":"https://github.com/slackapi/bolt-python/issues/1597"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3014df3f-5f4e-6ab7-84af-b32a2fc1e7ae
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id96D4:38231F:99A5A9:D27325:6AFEBDAC
html-safe-nonce65442c1b94a653377a051112ea34383953b3d4940d1c1eb17e43ce7ca8a7170d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkQ0OjM4MjMxRjo5OUE1QTk6RDI3MzI1OjZBRkVCREFDIiwidmlzaXRvcl9pZCI6Ijg3MzgxODc2MjIwODMzNzg2MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacda1f1c42116052b4dbfdbae4555b46b6a05253c0039c7d1baa20bb811524badf
hovercard-subject-tagissue:5782556126
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/slackapi/bolt-python/1597/issue_layout
twitter:imagehttps://opengraph.githubassets.com/985a446bc81b8d3643ff081a9d3c79a321106e490ab09697ce2247997b65a1d5/slackapi/bolt-python/issues/1597
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/985a446bc81b8d3643ff081a9d3c79a321106e490ab09697ce2247997b65a1d5/slackapi/bolt-python/issues/1597
og:image:altReproducible in: The slack_bolt version slack_bolt==1.30.0 slack_sdk==3.45.0 Python runtime version Python 3.12.5 OS info macOS 27.0 Steps to reproduce: Pass a plain function as listener middleware...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesahiljagtap08
hostnamegithub.com
expected-hostnamegithub.com
None95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e
turbo-cache-controlno-preview
go-importgithub.com/slackapi/bolt-python git https://github.com/slackapi/bolt-python.git
octolytics-dimension-user_id6962987
octolytics-dimension-user_loginslackapi
octolytics-dimension-repository_id268795735
octolytics-dimension-repository_nwoslackapi/bolt-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id268795735
octolytics-dimension-repository_network_root_nwoslackapi/bolt-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee1ce4c46d35aa8463a597a1bbffd4f0a456edb38
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/slackapi/bolt-python/issues/1597#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F1597
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F1597
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=slackapi%2Fbolt-python
Reloadhttps://github.com/slackapi/bolt-python/issues/1597
Reloadhttps://github.com/slackapi/bolt-python/issues/1597
Reloadhttps://github.com/slackapi/bolt-python/issues/1597
slackapihttps://github.com/slackapi
bolt-pythonhttps://github.com/slackapi/bolt-python
Codehttps://github.com/slackapi/bolt-python
Issues28 (28)https://github.com/slackapi/bolt-python/issues
Pull requests11 (11)https://github.com/slackapi/bolt-python/pulls
Actionshttps://github.com/slackapi/bolt-python/actions
Security and qualityhttps://github.com/slackapi/bolt-python/security
Insightshttps://github.com/slackapi/bolt-python/insights
https://github.com/slackapi/bolt-python
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/1597
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/1597
#1591https://github.com/slackapi/bolt-python/pull/1591
Assistant listener middleware crashes when given a plain functionhttps://github.com/slackapi/bolt-python/issues/1597#top
#1591https://github.com/slackapi/bolt-python/pull/1591
auto-triage-stalehttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22auto-triage-stale%22
https://github.com/sahiljagtap08
sahiljagtap08https://github.com/sahiljagtap08
on Oct 9, 2026https://github.com/slackapi/bolt-python/issues/1597#issue-5782556126
#1591https://github.com/slackapi/bolt-python/pull/1591
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Nov 9, 2026https://github.com/slackapi/bolt-python/issues/1597#issuecomment-6729196023
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
auto-triage-stalehttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22auto-triage-stale%22
on Nov 9, 2026https://github.com/slackapi/bolt-python/issues/1597#event-35521931689
Sign up for freehttps://github.com/signup?return_to=https://github.com/slackapi/bolt-python/issues/1597
Sign in to commenthttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/1597
auto-triage-stalehttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22auto-triage-stale%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.