MegaApiClient: All calls to megaclient API hanging

Description: I logged in using “sessionid” and “masterkey”.

what are you trying to do Trying to fetch account info, get nodes, download link, etc.

Actual Behavior: The methods GetAccountInformation(…) , GetNodes(…), etc,., is hanging for ever. what happens Any call to these methods are hanging…

Expected Behavior: The methods GetAccountInformation(…) , GetNodes(…) should return appropriate objects on success. what should happen These methods were working fine previously, but all of sudden not working now

Steps to Reproduce:

  1. Login using “sessionid” and “masterkey”.
  2. Call GetAccountInformation(…) or GetNodes(…) or any other method
  3. No response but instead hanging
  4. Sometimes i am getting these errors but not consistent " at CG.Web.MegaApiClient.MegaApiClient.RequestCore[TResponse](RequestBase request, Byte[] key)\r\n at CG.Web.MegaApiClient.MegaApiClient.Request[TResponse](RequestBase request, Byte[] key)\r\n at CG.Web.MegaApiClient.MegaApiClient.GetAccountInformation()\r\n at

OR

" at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)\r\n at System.Threading.Tasks.Task1.get_Result()\r\n at CG.Web.MegaApiClient.WebClient.PostRequest(Uri url, Stream dataStream, String contentType)\r\n at CG.Web.MegaApiClient.WebClient.PostRequestJson(Uri url, String jsonData)\r\n at CG.Web.MegaApiClient.MegaApiClient.RequestCore[TResponse](RequestBase request, Byte[] key)\r\n at CG.Web.MegaApiClient.MegaApiClient.Request[TResponse](RequestBase request, Byte[] key)\r\n at CG.Web.MegaApiClient.MegaApiClient.GetAccountInformation()\r\n

MegaApiClient Version: 1,7 to 1.9

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Documentation is updated with a note about new TLS requirement

⚠️ TLS 1.2 support should be configured explicitely when using .NET Framework <= 4.5 or all the API calls to Mega will hang.

  • For .NET Framework 4.5, add ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
  • For .NET Framework 4, add ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; (.NET 4.5 should be installed on the machine).

https://github.com/gpailler/MegaApiClient/blob/d85f00cbcc2e1b409ce504358db9f0f93c4e139e/docs/index.md?plain=1#L31-L33

using .NET Core 5 with your lib and supports TLS 1.2 and issue still exists and is exactly as itzlokeshjayaraj describes hungs on some and works for some other. I just test with normal HTTP req to mega API and its working fine but with normal HTTP is flagged as suspicious activity and would lock your account. Was good library until this issue is come out, maybe they change something you have to look deeper into this issue.

Hi, The issue is not consistent. It is working for some accounts(same or different PC) whereas not so for some others. Also For the same account, but with different session id’s, one is working and other not so. The accounts which are working too takes a lot of time to respond.(~ 2mins). Sometimes Manual proxy setup is “enabled” to use proxy server and issue appears at that time, but that too not consistent. So, it is difficult for me to correlate the exact reason. Any clues to sort out the issue is appreciated… Thanks in advance…