Subject: "ERROR: Can't login to mega.nz: API call 'ug' failed: Server returned error EBLOCKED"
From: YruNlsr6371bDg
Date: Thu, 12 Aug 2021 05:47:14 +0000
Hello,


After approximately 8 months of successfully using megatools to access our Mega
account, we are now not able to access our Mega account using megatools due to
server error (see below) - we tried using both
'megatools-1.11.0-git-20200830-win64' and 'megatools-1.11.0-git-20210505-win64'
(but we presume the same server error message will apply to all recent megatools
versions across all platforms).

We run with the following command-line arguments to increase
verbosity/debugging:

megatools.exe ls --ignore-config-file --no-ask-password
--debug=http,api,fs,cache,tman --proxy=socks5h://127.0.0.1:9050
--username=********@***********.*** --password=***************************
--recursive --long --header --export

(We also tried deleting the cache-files/temporary-directory, but that did not
fix the problem either.)

The error message from the server is posted as follows (with any private
information redacted):

================================================================================================================================================================================================
-> [{
"a": "us0",
"user": "********@***********.***"
}]
* Trying 127.0.0.1:9050...
* SOCKS5 connect to g.api.mega.co.nz:443 (remotely resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 9050 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=*.api.mega.co.nz
* start date: Dec 6 00:00:00 2020 GMT
* expire date: Dec 6 23:59:59 2021 GMT
* subjectAltName: host "g.api.mega.co.nz" matched cert's "*.api.mega.co.nz"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo
RSA Domain Validation Secure Server CA
* SSL certificate verify result: unable to get local issuer certificate (20),
continuing anyway.
* public key hash: sha256//0W38e765pAfPqS3DqSVOrPsC4MEOvRBaXQ7nY1AJ47E=
> POST /cs?id=********** HTTP/1.1
Host: g.api.mega.co.nz
Accept: */*
Accept-Encoding: deflate, gzip
User-Agent: Megatools (1.11.0)
Content-Type: application/json
Content-Length: 48

* upload completely sent off: 48 out of 48 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type, MEGA-Chrome-Antileak
< Access-Control-Expose-Headers: Original-Content-Length
< Access-Control-Max-Age: 86400
< Original-Content-Length: 9
< Content-Length: 9
< Connection: keep-alive
< 
* Connection #0 to host 127.0.0.1 left intact
<- [{
"v": 1
}]
-> [{
"a": "us",
"user": "********@***********.***",
"uh": "***********"
}]
* Found bundle for host g.api.mega.co.nz: 0x2ca2400 [serially]
* Can not multiplex, even if we wanted to!
* Re-using existing connection! (#0) with proxy 127.0.0.1
* Connected to 127.0.0.1 (127.0.0.1) port 9050 (#0)
> POST /cs?id=********** HTTP/1.1
Host: g.api.mega.co.nz
Accept: */*
Accept-Encoding: deflate, gzip
User-Agent: Megatools (1.11.0)
Content-Type: application/json
Content-Length: 67

* upload completely sent off: 67 out of 67 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type, MEGA-Chrome-Antileak
< Access-Control-Expose-Headers: Original-Content-Length
< Access-Control-Max-Age: 86400
< Original-Content-Length: 1298
< Content-Encoding: gzip
< Content-Length: 1034
< Connection: keep-alive
< 
* Connection #0 to host 127.0.0.1 left intact
<- [{
"csid":
"********************************************************************************************************************************************************************************************************************************************************************************************************************************************************",
"privk":
"***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************",
"k": "**********************",
"u": "***********",
"ach": 1
}]
-> [{
"a": "ug"
}]
* Found bundle for host g.api.mega.co.nz: 0x2ca2400 [serially]
* Can not multiplex, even if we wanted to!
* Re-using existing connection! (#0) with proxy 127.0.0.1
* Connected to 127.0.0.1 (127.0.0.1) port 9050 (#0)
> POST
/cs?id=**********&sid=**********************************************************
HTTP/1.1
Host: g.api.mega.co.nz
Accept: */*
Accept-Encoding: deflate, gzip
User-Agent: Megatools (1.11.0)
Content-Type: application/json
Content-Length: 12

* upload completely sent off: 12 out of 12 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type, MEGA-Chrome-Antileak
< Access-Control-Expose-Headers: Original-Content-Length
< Access-Control-Max-Age: 86400
< Original-Content-Length: 3
< Content-Length: 3
< Connection: keep-alive
< 
* Connection #0 to host 127.0.0.1 left intact
<- -16
ERROR: Can't login to mega.nz: API call 'ug' failed: Server returned error
EBLOCKED
================================================================================================================================================================================================


So, is this a known bug or is this error otherwise fixable?

Thanks!