-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: runtime error: invalid memory address or nil pointer dereference #20
Comments
@amir3code Thanks for your interest in this repository. It seems sometimes mconn, err := manager.LoadAuthentication()
if err != nil {
fmt.Println(err)
} instead of mconn, _ := manager.LoadAuthentication() For more evidences please share the log file |
For your information, if you want to fetch the list of all the channels and chat groups, I recommend to use |
I now have a |
Actually I have no idea for the problem. Although I checked responses from not only |
Yeah yeah they are both the same unfortunately. func getDialogsAllTest(caller *mtproto.RPCaller) *mtproto.TypeMessagesDialogs {
r, _ := caller.MessagesGetAllChats(context.Background(), &mtproto.ReqMessagesGetAllChats{})
return r
} The struct func getDialogsAllTest(caller *mtproto.RPCaller) *mtproto.TypeMessagesDialogs {
r, _ := caller.MessagesGetAllChats(context.Background(), &mtproto.ReqMessagesGetAllChats{
ExceptIds: nil,
XXX_NoUnkeyedLiteral: struct{}{},
XXX_unrecognized: nil,
XXX_sizecache: 0,
})
return r
} And that is |
Right it is all try and error. You can find some old methods in Telegram API document, but its version is too old (document: 23, cjongseok/mtproto: 71, latest: 91). Another documentation source is tdlib document. It is quite recent, but you know there is a interface gap between tdlib and tl-schema. |
The code that I am writing is this:
What I am trying to do is to get a list of dialogs. But sometime
panic
error happens due to some network error.The error that happens is this:
How can I handle this kind of error? (I have put comment after line 22 and 16 of my code to make it clear)
As you can see I have received the error in
err
variable and checked it but I still get this panic.Not to mention that I dont ALWAYS get this panic, It just happens sometimes due to network errors, How can I handle this one?
The text was updated successfully, but these errors were encountered: