org.telegram.telegrambots.exceptions.TelegramApiRequestException

Unable to deserialize response


Samebug tips4

You're inputing information in a way the Json Parser can't understand. This page might enlighten you a little: https://goo.gl/g5wrvy

Check if you forgot to set the "data" field inside your request. If you did set it, check if it's being serialized before sending, and if it's being serialized the right way.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web1

Solution icon of github
via GitHub by ospavel
, 6 months ago
Unable to deserialize response

Stack trace

  • org.telegram.telegrambots.exceptions.TelegramApiRequestException: Unable to deserialize response at org.telegram.telegrambots.api.methods.updates.GetUpdates.deserializeResponse(GetUpdates.java:122) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:186) Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', ' false' or 'null') at [Source: <html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx/1.10.0</center> </body> </html> ; line: 1, column: 2] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:456) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1906) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:749) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3834) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3783) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2861) at org.telegram.telegrambots.api.methods.updates.GetUpdates.deserializeResponse(GetUpdates.java:114) ... 1 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

61 times, 2 hours ago
Once, 1 day ago
3 times, 3 weeks ago
Once, 3 weeks ago
Once, 1 month ago
111 more bugmates