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

Telegram update TypeError logs #46

Closed
hamidqp opened this issue Oct 18, 2021 · 5 comments
Closed

Telegram update TypeError logs #46

hamidqp opened this issue Oct 18, 2021 · 5 comments

Comments

@hamidqp
Copy link
Contributor

hamidqp commented Oct 18, 2021

Hi, todays the only thing i get from logs are bunch of these, but idk what could cause this problem, I guess the more users bot have the more these logs showing up.
Also im using the tdlight telegram bot api.

Failed to process Telegram update , reason: TypeError: Zanzara\Telegram\Type\Update::getUpdateType(): Return value must be of type string, null returned in /vendor/badfarm/zanzara/src/Zanzara/Telegram/Type/Update.php:339
Stack trace:
#0 /vendor/badfarm/zanzara/src/Zanzara/Listener/ListenerResolver.php(34): Zanzara\Telegram\Type\Update->getUpdateType()
#1 /vendor/badfarm/zanzara/src/Zanzara/UpdateMode/UpdateMode.php(88): Zanzara\Listener\ListenerResolver->resolveListeners()
#2 /vendor/badfarm/zanzara/src/Zanzara/UpdateMode/Polling.php(78): Zanzara\UpdateMode\UpdateMode->processUpdate()
#3 /vendor/react/promise/src/FulfilledPromise.php(28): Zanzara\UpdateMode\Polling->Zanzara\UpdateMode\{closure}()
#4 /vendor/react/promise/src/Promise.php(134): React\Promise\FulfilledPromise->then()
#5 /vendor/react/promise/src/Promise.php(168): React\Promise\Promise::React\Promise\{closure}()
...
@cheeghi
Copy link
Collaborator

cheeghi commented Oct 18, 2021

Hi, probably it is an update type we haven't managed. Can you tell us for which update it happens?

@awohsen
Copy link
Contributor

awohsen commented Mar 16, 2022

Hello, I have very same problem but it comes from nowhere! there is no new messages that cause this and i guess maybe just because the response of the get update is weird it pop this out.

@awohsen
Copy link
Contributor

awohsen commented Apr 26, 2022

image

I did find one of them! by placing var_dump before mapping.

ChatJoinRequest That came on from Bot API 5.4

@awohsen
Copy link
Contributor

awohsen commented Apr 26, 2022

image

Another one from ChatMemberUpdated introduced in Bot API 5.1

@awohsen
Copy link
Contributor

awohsen commented Apr 26, 2022

So it's not about the new not managed update types(since they are imported already), we need to have custom listeners for each one of the update types or at least help them go throw the global onUpdate listener.

Updates like the two above I mentioned are not getting to onUpdate because they don't get initialized on getUpdateType.

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

No branches or pull requests

3 participants