Can't log in to very large Mega Pro account

What is the problem you are having with rclone?

Unable to log in to a very large Mega Pro account, works fine with other (smaller) accounts. User/pass is correct.

What is your rclone version (output from rclone version)

rclone v1.55.0

  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.2
  • go/linking: static
  • go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 18.04.1 LTS

Which cloud storage system are you using? (eg Google Drive)

Mega

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone lsf -vv Mega:

The rclone config contents with secrets removed.

[Mega]
type = mega
user = [redacted]
pass = [redacted]
debug = true

A log from the command with the -vv flag

rclone lsf -vv Mega:
2021/04/22 12:48:31 DEBUG : Using config file from "/home/rclone/rclone.conf"
2021/04/22 12:48:31 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "lsf" "-vv" "Mega:"]
2021/04/22 12:48:31 DEBUG : Creating backend with remote "Mega:"
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 1/10: Try again
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 2/10: Try again
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 3/10: Try again
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 4/10: Try again
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 5/10: Try again
2021/04/22 12:48:32 DEBUG : *go-mega*: Retry API request 6/10: Try again
2021/04/22 12:48:33 DEBUG : *go-mega*: Retry API request 7/10: Try again
2021/04/22 12:48:33 DEBUG : *go-mega*: Retry API request 8/10: Try again
2021/04/22 12:48:35 DEBUG : *go-mega*: Retry API request 9/10: Try again
2021/04/22 12:48:37 DEBUG : *go-mega*: Retry API request 10/10: Try again
2021/04/22 12:48:42 Failed to create file system for "Mega:": couldn't login: Try again

Not sure what is happening here, but it might be worth trying with --low-level-retries 20 to see if it needs a bit more time to initialise or something.

Thanks ncw but that gave the same result, so I increased the number to 200 and I'm seeing

2021/04/22 15:26:32 DEBUG : *go-mega*: Retry API request 68/200: Try again
2021/04/22 15:26:37 DEBUG : *go-mega*: Retry API request 69/200: Try again
2021/04/22 15:31:42 DEBUG : *go-mega*: Retry API request 70/200: Post "https://g.api.mega.co.nz/cs?id=2519308031&sid=uMP85KB_mw7OFut6NHNO_EJhQ2w2bjJLYkYwOHeSU7MTThOQ4PG0Ik2ilg": net/http: timeout awaiting response headers
2021/04/22 15:31:47 DEBUG : *go-mega*: Retry API request 71/200: Try again
2021/04/22 15:31:52 DEBUG : *go-mega*: Retry API request 72/200: Try again
2021/04/22 15:31:57 DEBUG : *go-mega*: Retry API request 73/200: Try again

It is a very big Mega account, it can take several minutes to log in via a web browser.

Try increasing --timeout and --contimeout

 --contimeout duration                Connect timeout (default 1m0s)
  --timeout duration                   IO idle timeout (default 5m0s)

And see if that helps.

Thanks, that did indeed help, I'll play around with the duration but using

rclone: Version "v1.55.0" starting with parameters ["rclone" "lsf" "-vv" "--contimeout" "10m" "--timeout" "15m" "--low-level-retries" "30" "Mega:"]

listed the drive, so it seems it's just the size of the drive making it take longer.

Hopefully it'll work for copying also.

Once it has started it should be OK. Note that since it takes such a long time to start up then you probably want to run an rclone mount to use it so you don't have to keep stopping and starting it. I don't normally recommend that as it is more efficient to use rclone copy than cp from and rclone mount but I think it might be a good idea in this case!

I left rclone copy going overnight to see what would happen and a colab script doing a copy also. One of them copied successfully, probably the colab script as the rclone log is just full of

rclone copy --contimeout 20m --timeout 20m --low-level-retries 30
Failed to copy: failed to open source object: open download file failed: Try again
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 408 (Request Timeout)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% aut$
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>408.</b> <ins>That’s an error.</ins>
  <p>Your client has taken too long to issue its request.  <ins>That’s all we know.</ins>

So it looks as though the time taken is too long for Google.

I'll look into mounting and see if it helps, thanks.

1 Like

Thanks ncw, mounting works perfectly with the extended timeouts, its copying away nicely :smile:

1 Like

Great! Glad that is working :slight_smile: