TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.17k stars 686 forks source link

Unexpected character encountered while parsing value: <. Path '', line 0, position 0. #499

Closed TERMI80 closed 6 years ago

TERMI80 commented 6 years ago

Hello, i got always this error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. below my sub Could you help me?

Async Sub PolBotFiglio() Dim retry As Boolean = True

While retry = True
    Try
        Dim io = Await BtClient.GetMeAsync()
        Dim result = Await BtClient.GetUpdatesAsync(offset2)
        Dim noff As Integer
        Dim Messaggio As String
        For Each m In result

            If m.EditedMessage Is Nothing Then
                If m.Message.Chat IsNot Nothing Then
                    Messaggio = m.Message.Text
                    If PrimoAvvio = False Then
                        HandleMessageFiglio(Messaggio)
                    End If
                    noff = m.Id
                    offset2 = noff + 1
                End If
            End If
        Next
        PrimoAvvio = False
        Thread.Sleep(20)
    Catch ex As Exception
        LogInfo( ex.Message)         

        retry = True
    End Try
End While
poulad commented 6 years ago

@TERMI80 First, Use issue template. Second, consider trying latest package version before reopenning the issue.

a-a-k commented 6 years ago

This is same one? https://github.com/TelegramBots/telegram.bot/issues/357

poulad commented 6 years ago

@a-a-k Already fixed. Update to latest version.