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

Deserialization on attachment id as Integer out of range

オープン
#1,468 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

まず、attachment モデルと Slack メッセージに使用されている Gson のデシリアライズパスを特定します。レポートに示されている attachment id で問題を再現し、その後、範囲外の id に対するカバレッジを追加します。その id を含むメッセージが、報告された Exception なしに正常にデシリアライズできれば完了です。

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

説明

bug java server-side-issue

Slack has generated attachments with id values that cannot be parsed into Java Integers. As a result, the Bolt SDK fails when reading those messages.

Team: T34263EUF / E7T5PNK3P
Channel: C08KGS622HL
Message TS: 1746210816.491199

  "attachments": [
    {
      ...
      "id": 8861161648288
    }
  ]
Reproducible in:
The Slack SDK version

1.45.2

Java Runtime version

17

OS info

n/a

Steps to reproduce:

Deserializing a message with an attachment that has an id that is too large for a Java Integer fails.

Expected result:

Parsing succeeds

Actual result:

An exception is thrown:

java.lang.NumberFormatException: Expected an int but was 8861161648288 at line 157 column 26 path $.attachments[0].id
com.google.gson.JsonSyntaxException: 
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:229)
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:219)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
	at com.google.gson.Gson.fromJson(Gson.java:963)
	at com.google.gson.Gson.fromJson(Gson.java:928)
	at com.google.gson.Gson.fromJson(Gson.java:877)
	at com.google.gson.Gson.fromJson(Gson.java:848)
Requirements

Please make sure if this topic is specific to this SDK. 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 agree to those rules.

主要言語
Java
スター
602
フォーク
235
平均マージ
2日 13時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

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

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

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

似ている issue

Java の issue をもっと見る

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

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