The problem is that the error messsage seems to come from
message = $"Unable to login: {logInResult.Info.Message}";
So it would be an exception that happens inside the library and is returned this way which doesn't seems a good idea. You can't get the full exception to know in which internal method it happens? Seems you need to initialize something else before calling
LoginAsync.
Member
2 Points
28 Posts
Object reference error
Mar 04, 2021 08:45 AM|Saeed57|LINK
Hello,
I'm trying to enter my Instagram account with InstagramApiSharp, but encounter this expectation error:
Unable to login: Object reference not set to an instance of an object.
Do you see anything wrong with this code?
All-Star
48720 Points
18186 Posts
Re: Object reference error
Mar 10, 2021 11:34 AM|PatriceSc|LINK
Hi,
The problem is that the error messsage seems to come from
message = $"Unable to login: {logInResult.Info.Message}";
So it would be an exception that happens inside the library and is returned this way which doesn't seems a good idea. You can't get the full exception to know in which internal method it happens? Seems you need to initialize something else before calling LoginAsync.