Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

SocketModeClient crashes on Events API payloads without an inner event

オープン 初心者向け
#2,753 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@kyungyeon-byun-imweb-me がすでに取り組んでいます。

2026年10月1日 から。

  • #2754 @kyungyeon-byun-imweb-me による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
api, networking

調査の方向性

SocketModeClient.onWebSocketMessage の、issue で説明されている event.payload.event.type へのアクセス付近から始め、既存の Socket Mode メッセージ処理テストを確認してください。app_rate_limited payload が独自の type を使って dispatch され、payload が event として公開され、確認のために slack_event が emit され、malformed payload によって処理が終了しないことが完了条件です。

索引モデルが issue の本文から書いたものです。

説明

Package

@slack/socket-mode

SDK Version

3.0.1 and current main (3.1.0)

Node.js Version

v24.20.0

Operating System

macOS 26 and Linux

Steps to Reproduce
  1. Create a SocketModeClient.
  2. Deliver an events_api envelope whose Events API payload has no inner event, such as Slack's documented app_rate_limited payload:
{
  "type": "events_api",
  "envelope_id": "example",
  "payload": {
    "type": "app_rate_limited",
    "team_id": "T111",
    "minute_rate_limited": 1610241741,
    "api_app_id": "A111"
  }
}
  1. SocketModeClient.onWebSocketMessage evaluates event.payload.event.type.

Slack documents that app_rate_limited has no inner event: https://docs.slack.dev/reference/events/app_rate_limited/

Expected Result

The client should dispatch the payload using its own type, expose the payload as event, and continue to emit the generic slack_event so consumers can acknowledge the envelope. Malformed payloads without either type should not terminate the process and should still reach slack_event for acknowledgement.

Actual Result

The client throws before application listeners can acknowledge the envelope:

TypeError: Cannot read properties of undefined (reading 'type')
    at SocketModeClient.onWebSocketMessage (.../SocketModeClient.js:346:37)

This can produce a restart and redelivery loop because the envelope cannot be acknowledged.

I have a focused fix with regression tests ready to submit.

主要言語
TypeScript
スター
3.4k
フォーク
688
平均マージ
1日 49分
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

slackapi/node-slack-sdk のほかの issue

slackapi/node-slack-sdk の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。