Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot construct instance of org.telegram.telegrambots.meta.api.objects.WriteAccessAllowed #1271

Closed
lusorio opened this issue Sep 8, 2023 · 2 comments
Labels

Comments

@lusorio
Copy link

lusorio commented Sep 8, 2023

Describe the bug

I can't really tell which kind of update is creating this issue, and I've seen only twice in the couple of months I've been using the SDK. However, once it appears, it doesn't stop until I delete the bot. Restarting the backend, removing the bot from any group, doesn't help. I keep receiving the impossible-to-deserialize update.

I've seen (kind of) similar problems here

but I'm coming here as I can't voluntarily reproduce the issue and I won't be able to know if the upgrade to 6.8.0 will fix it

Would you be able to give any clue?
Thanks

Additional context

2023-09-08T16:35:20.212 | ******* Telegram Connection | ERROR | o.t.t.u.DefaultBotSession | Unable to deserialize response
org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException: Unable to deserialize response
	at org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod.deserializeResponseInternal(PartialBotApiMethod.java:57)
	at org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod.deserializeResponseArray(PartialBotApiMethod.java:39)
	at org.telegram.telegrambots.meta.api.methods.updates.GetUpdates.deserializeResponse(GetUpdates.java:83)
	at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.getUpdatesFromServer(DefaultBotSession.java:258)
	at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:188)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `org.telegram.telegrambots.meta.api.objects.WriteAccessAllowed` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: (String)"{"ok":true,"result":[{"update_id":xxxxxxxxxxx,
"message":
{
    "message_id": 14,
    "from": {
        "id": xxxxxxxxxxx,
        "is_bot": false,
        "first_name": "xxxxxxxxxxx",
        "last_name": "xxxxxxxxxxx",
        "username": "xxxxxxxxxxx",
        "language_code": "fr"
    },
    "chat": {
        "id": xxxxxxxxxxx,
        "first_name": "xxxxxxxxxxx",
        "last_name": "xxxxxxxxxxx",
        "username": "xxxxxxxxxxx",
        "type": "private"
    },
    "date": 1694190593,
    "write_access_allowed": {
        "web_app_name": "xxxxxxxxxxx"
    }
}
},{"update_id":xxxxxxxxxxx,
"message":{"message_id":15,"from":{"id":xxxxxxxxxxx,"is_bot":false,"first_name":"xxxxxxxxxxx","last_name":"xxxxxxxxxxx","username""[truncated 1814 chars]; line: 2, column: 291] (through reference chain: org.telegram.telegrambots.meta.api.objects.ApiResponse["result"]->java.util.ArrayList[0]->org.telegram.telegrambots.meta.api.objects.Update["message"]->org.telegram.telegrambots.meta.api.objects.Message["write_access_allowed"])
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
	at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1728)
	at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1353)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1415)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
	at org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod.deserializeResponseInternal(PartialBotApiMethod.java:50)
	... 4 common frames omitted
@lusorio
Copy link
Author

lusorio commented Sep 13, 2023

Hey, thanks a lot for the update! Any idea on the next release date?

@rubenlagus rubenlagus added the bug label Apr 1, 2024
@rubenlagus
Copy link
Owner

This should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants