Solution skill
Telegram.Bot 22.5.0 - webhook Update is null
Complete solution
Shows how to fix telegram.Bot 22.5.0 - webhook Update is null. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Workaround for null webhook Update on Telegram.Bot 22.5.0: add the Telegram.Bot.AspNetCore NuGet package so you can call ConfigureTelegramBotMvc() with v22.5.
Steps
- Workaround for null webhook Update on Telegram.Bot 22.5.0: add the
Telegram.Bot.AspNetCoreNuGet package so you can callConfigureTelegramBotMvc()with v22.5. The maintainer also notes a null Update usually means a problem elsewhere in your setup, so double check your webhook configuration too. - https://github.com/TelegramBots/Telegram.Bot/issues/1466: Issue TelegramBots/Telegram.Bot#1466 (closed, 12 comments): Hello! My project is ASP.NET Core .NET8 and I use Telegram.Bot 22.4.4 and everything works fine, but after updating to version 22.5.0 ConfigureTelegramBotMvc() is no longer there and I removed it as it is written in the annotation: Services.ConfigureTelegramBot* is no longer necessary to make your Webhook bot compatible with Telegram updates! But when an update comes from the bot to the controller, "Update update" is always null Example: ``` [HttpPost] public async Task[IActionResult] Post([FromBody] Update update, [FromServices] UpdateHandlers handleUpdateService, CancellationToken cancellati
When to use
You are seeing this: https://github.com/TelegramBots/Telegram.Bot/issues/1466: Issue TelegramBots/Telegram.Bot#1466 (closed, 12 comments): Hello! Use this skill when you run into "Telegram.Bot 22.5.0 - webhook Update is null".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: Telegram.Bot 22.5.0, v22.5, Telegram.Bot 22.4.4. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/TelegramBots/Telegram.Bot/issues/1466:
Evidence
Issue gh:TelegramBots/Telegram.Bot#1466: the reporter asked: Issue TelegramBots/Telegram.Bot#1466 (closed, 12 comments): Hello! My project is ASP.NET Core .NET8 and I use Telegram.Bot 22.4.4 and everything works fine, but after updating to version 22.5.0 ConfigureTelegramBotMvc() is no longer there and I removed it as it is written in the annotation: Services.ConfigureTelegramBot* is no longer necessary to make your Webhook bot compatible with Telegram updates! But when an update comes from the bot to the controller, "Update update" is always null Example: `` [HttpPost] public async Task[IActionResult] Post([FromBody] Update update, [FromServices] UpdateHandlers handleUpdateService, CancellationToken cancellati The verified answer was: Workaround for null webhook Update on Telegram.Bot 22.5.0: add the Telegram.Bot.AspNetCore NuGet package so you can call ConfigureTelegramBotMvc()` with v22.5. The maintainer also notes a null Update usually means a problem elsewhere in your setup, so double check your webhook configuration too. Evidence thread: https://github.com/TelegramBots/Telegram.Bot/issues/1466
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_n0uBnbj_VF-bSddL796TPA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Telegram.Bot 22.5.0 - webhook Update is null <span>— Vectle</span></a>