justdmitry / TonLib.NET

tonlibjson wrapper for .NET
MIT License
10 stars 6 forks source link

Exception "Empty response received" when calling CreateQuery #1

Closed ZhangYiQiu closed 1 year ago

ZhangYiQiu commented 1 year ago

image

justdmitry commented 1 year ago

Library has sent the request, but received empty text as response.

Usually this happens when LiteServer you connected to has failed to answer. So you just need to reconnect (call InitIfNeeded() again) and retry CreateQuery call.

Sometimes tonlib can fail to parse your request - this has happened to me when I tried to send "really strange or wrong" requests (garbage instead of base64 bytes etc).

So first this here is to make sure you enabled (didn't disable) logging and check "Sending" and "Received" log entries, like this: cmd_2023-04-24_11-20-50

Usually this logs can give you some knowledge what exactly happened.