Open cheditx opened 3 weeks ago
Hey, 6.5 has removed a lot of try/catches so you should debug a bit more into the issue. Do you have an example project to test on ?
Is this the full stack trace ? Cause there havent been changes within the last called method for a long time.
Hey, 6.5 has removed a lot of try/catches so you should debug a bit more into the issue. Do you have an example project to test on ?
Is this the full stack trace ? Cause there havent been changes within the last called method for a long time.
Yes its all the console print, i used a simple example code with FormBase implementation
var bot = BotBaseBuilder.Create().QuickStart
Console.ReadLine();
await bot.Stop();
and then a class with MessagesListener : FormBase with Load(MessageResult)
Yes its all the console print, i used a simple example code with FormBase implementation
var bot = BotBaseBuilder.Create().QuickStart("XXXXXXXXXXXXXXXXXXXXXXXX").Build(); await bot.Start();
Console.ReadLine(); await bot.Stop(); and then a class with MessagesListener : FormBase with Load(MessageResult)
I tested it as well with
And it works as expected. I would say there is probably some issue within your StartForm. But I do not know exactly.
Did you sent a message or /start command to invoke the bot ?
Did you used a StartFormFactory or just a Form ?
Yes its all the console print, i used a simple example code with FormBase implementation var bot = BotBaseBuilder.Create().QuickStart("XXXXXXXXXXXXXXXXXXXXXXXX").Build(); await bot.Start();
Console.ReadLine(); await bot.Stop(); and then a class with MessagesListener : FormBase with Load(MessageResult)
I tested it as well with
And it works as expected. I would say there is probably some issue within your StartForm. But I do not know exactly.
Did you sent a message or /start command to invoke the bot ?
My code worked well all the time, until i added it on a group idk what happened, i used the same FormBase as always and it just returned that error, i tried with another token and it started working again
Some stuff regards bot commands I groups changed. But I believe that has nothing to do, with your case.
Edit: but that's a good hint, I'll try that out to reproduce it.
Edit2: groups works different, therefore is a special form called "SplitterForm"
My code worked well all the time, until i added it on a group idk what happened, i used the same FormBase as always and it just returned that error, i tried with another token and it started working again
Another token means probably different group settings. If you got access to both, please check the BotFather settings for groups. There are different ones.
@cheditx So this issue can be closed ?
@cheditx So this issue can be closed ?
i don't think so, because everytime a bot join a group the bot gets an error...
@cheditx So this issue can be closed ?
i don't think so, because everytime a bot join a group the bot gets an error...
Then I need more details or an example project. I added my testbot to a group and it works fine. (I used the public available TelegramBotBase.Example project)
So please give more insights on what you do exactly.
Fixed via #67 and version 6.5.1
To be honest i don't know what really happened, i just got this error after receiving some updates on the bot
System.NullReferenceException: Object reference not set to an instance of an object. at TelegramBotBase.BotBase.Client_MessageLoop(Object sender, UpdateResult e) at TelegramBotBase.Base.MessageClient.OnMessageLoop(UpdateResult update) at TelegramBotBase.Base.MessageClient.HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken) at Telegram.Bot.Polling.DefaultUpdateHandler.HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken) at Telegram.Bot.Polling.DefaultUpdateReceiver.ReceiveAsync(IUpdateHandler updateHandler, CancellationToken cancellationToken) at Telegram.Bot.TelegramBotClientExtensions.ReceiveAsync(ITelegramBotClient botClient, IUpdateHandler updateHandler, ReceiverOptions receiverOptions, CancellationToken cancellationToken) at Telegram.Bot.TelegramBotClientExtensions.<>c__DisplayClass127_0.<b__0>d.MoveNext()
EDIT:
i ""fixed"" just by switching from the version 6.5 to 6.4