Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Deserialization on attachment id as Integer out of range

Đang mở
#1,468 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách xác định model attachment và luồng deserialization của Gson được sử dụng cho các message của Slack. Tái hiện issue với attachment id được hiển thị trong report, sau đó thêm coverage cho một id nằm ngoài phạm vi. Hoàn thành khi các message chứa id đó được deserialize thành công mà không gặp Exception đã nêu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
602
Fork
235
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của slackapi/java-slack-sdk

Tất cả issue của slackapi/java-slack-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.