rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.77k stars 1.22k forks source link

id exceeds the shaping range #1021

Closed violets007 closed 1 year ago

violets007 commented 2 years ago

Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (5011726309) out of range of int at [Source: (String)"{"ok":true,"result":[{"update_id":745388191, "message":{"message_id":13771,"from":{"id":5011726309,"is_bot":false,"first_name":"Tim","last_name":"Zhang","language_code":"zh-hans"},"chat":{"id":5011726309,"first_name":"Tim","last_name":"Zhang","type":"private"},"date":1640518199,"text":"/start","entities":[{"offset":0,"length":6,"type":"bot_command"}]}},{"update_id":745388192, "message":{"message_id":13781,"from":{"id":1207257557,"is_bot":false,"first_name":"xiaoxuan007","username":"xiaoxuan0071""[truncated 1418 chars]; line: 2, column: 54] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663) at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:869) at com.fasterxml.jackson.core.base.ParserBase._parseIntValue(ParserBase.java:801) at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:645) at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:472) at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:452) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288) ... 18 more

violets007 commented 2 years ago

version:

rubenlagus commented 2 years ago

@zixuan2020 Please update the library, id from User object should be Long