Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

System.AggregateException on Bot.GetMe

Open williamokano opened this issue 10 years ago • 9 comments

Hi guys, I'm getting this exception whenever I try to run the demos.

The inner exception says that the Task have been cancelled.

Any ideas?

williamokano avatar Feb 09 '16 03:02 williamokano

AggregateException - is compilation of set or possibly just one exception. Take a look at inner details.

Ruberoid avatar Feb 09 '16 06:02 Ruberoid

I took, as I said, the inner exception just say, task cancelled.

By the way, the problema stopped happening, I don't know why, just stopped.

I'll close this issue, and if this start happening again, I'll update you.

Thanks

williamokano avatar Feb 09 '16 15:02 williamokano

@Ruberoid I found the problem.

The HttpClient is getting timeout when the getUpdates have nothing new for me.

Any suggestions? Just add a try catch and keep the life going?

williamokano avatar Feb 09 '16 23:02 williamokano

I also have this exact issue. I'm using 8.0.0 version. I should mention when i run the Echo Demo from official examples that uses 7.0.0 version It works just fine and I never get an exception. But when I use the exact same code in a project with 8.0.0 version I get those exceptions. So maybe this is happening only in the latest version.

Sobiru avatar Feb 11 '16 23:02 Sobiru

Yeah, I forgot to mention that when I run the echo demo this behavior doesn't happen.

williamokano avatar Feb 11 '16 23:02 williamokano

@williamokano , In your earlier post you said:

The HttpClient is getting timeout when the getUpdates have nothing new for me. Any suggestions? Just add a try catch and keep the life going?

But for me, I get an exception even on the await Bot.GetMe(), Are you sure this only happens when we don't have new updates? Or you are only referring to await Bot.GetUpdates()?

Sobiru avatar Feb 11 '16 23:02 Sobiru

Not sure. Sometimes this also happening to me on the getMe too.

Em qui, 11 de fev de 2016 21:17, Sobiru [email protected] escreveu:

@williamokano https://github.com/williamokano , In your earlier post you said:

The HttpClient is getting timeout when the getUpdates have nothing new for me. Any suggestions? Just add a try catch and keep the life going?

But for me, I get an exception even on the await Bot.GetMe(), Are you sure this only happens when we don't have new updates?

— Reply to this email directly or view it on GitHub https://github.com/MrRoundRobin/telegram.bot/issues/83#issuecomment-183096989 .

williamokano avatar Feb 11 '16 23:02 williamokano

I just went ahead and uninstalled v8.0.0 from my project and then installed the v7.0.0 version with this command: Install-Package Telegram.Bot -Version 7.0.0 Now I get no exceptions whatsoever so I'm starting to think it is a version issue.

Sobiru avatar Feb 12 '16 09:02 Sobiru

should be fixed in f8ebeaf

MrRoundRobin avatar Feb 23 '16 20:02 MrRoundRobin