-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[msteams] Teams SDK migration breaks on path-to-regexp v8+ — /api* wildcard pattern rejected #54889
Description
Description
After upgrading to 2026.3.24, the Microsoft Teams channel fails to start with:
Missing parameter name at index 5: /api*; visit https://git.new/pathToRegexpError for info
The Teams SDK migration (#51808) introduced Express route registration using "/api*" as a middleware pattern:
// dist/dist-B5zoW1KK.js:3425
this.express.use("/api*", express_1.default.json());path-to-regexp v8+ (shipped with Express 5) no longer accepts bare * wildcards — they require named parameters like /api{*path} or /api(.*).
The error fires during both the Graph user resolution phase (msteams resolve failed) and the channel startup itself, causing the channel to crash-loop through all 10 auto-restart attempts.
Steps to Reproduce
- Upgrade to 2026.3.24
- Have
channels.msteamsconfigured and enabled - Start the gateway
- Teams channel fails with the
path-to-regexperror
Gateway Logs
gateway/channels/msteams starting provider (port 3980)
gateway/channels/msteams msteams resolve failed; using config entries. TypeError: Missing parameter name at index 5: /api*
gateway/channels/msteams [default] channel exited: Missing parameter name at index 5: /api*
gateway/channels/msteams [default] auto-restart attempt 1/10 in 5s
Workaround
Patch the route pattern in dist/dist-B5zoW1KK.js:
- this.express.use("/api*", express_1.default.json());
+ this.express.use("/api{*path}", express_1.default.json());Also patch node_modules/path-to-regexp/dist/index.js line 96 to handle bare wildcards gracefully, as the external module throws before the bundled copy is reached.
Requires a hard openclaw gateway stop + openclaw gateway start cycle — gateway restart under launchd may not fully reload the patched files.
Expected Behavior
Teams channel starts normally after upgrade.
Environment
- OpenClaw: 2026.3.24
- OS: macOS arm64 (Darwin 25.3.0)
- Node: v25.6.1
- Azure Bot: Single-tenant
- Teams config: custom webhook path, port 3980