Rclone with Mega appears to work only in some accounts

What is the problem you are having with rclone?

I'm trying to execute commands from rclone with Mega, like rclone lsd mega:, but always receiving Failed to create file system for "mega:": couldn't login: Try again

  1. MegaCMD is installed and works. I can execute all the instructions in interactive mode;
  2. Works in other Mega account (free account) and with only one file (without any folders);
  3. I tried to use Mega with WebDAV but seems to always disconnect after ~1 min.
  4. Works with Windows but need to wait a longe time (more than 5 minutes). With Debian, not working (I using AWS EC2)

About the account:

  • My account (as I'm trying to use Rclone) it's Pro II (8TB plan);
  • Have more than 500GB of storage used;
  • 2FA temporary disabled;
  • Password temporary doesn't have any special characters, only alphanumeric (e-mail too);

Run the command 'rclone version' and share the full output of the command.

I tried so many version, from v1.5.x until the beta.

rclone v1.64.0-beta.7162.70cbcef62
- os/version: debian 11.7 (64 bit)
- os/kernel: 5.10.0-23-cloud-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21rc3
- go/linking: static
- go/tags: none

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


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

rclone lsd mega:

The rclone config contents with secrets removed.

type = drive
client_id = XXXXXXXXX
client_secret = XXXXXXXXX
scope = drive.readonly

type = mega

type = webdav
url =
vendor = other

type = mega

mega.new it's other account for tests purposes

A log from the command with the -vv flag

2023/07/24 05:42:08 DEBUG : rclone: Version "v1.64.0-beta.7162.70cbcef62" starting with parameters ["rclone" "lsd" "mega:" "-vv"]
2023/07/24 05:42:08 DEBUG : Creating backend with remote "mega:"
2023/07/24 05:42:08 DEBUG : Using config file from "/home/admin/.config/rclone/rclone.conf"


rclone lsd mega: -vv

and post all output here

All the output from this command is in the description of the issue, on the section: "A log from the command with the -vv flag"

Is it? I do not see error you mention in your -vv output

Sorry, I mixed the outputs.

  • couldn't login: Try again happened when I'm running rclone sync -P "gdrive:Folder" "mega:Folder" --transfers=30 --drive-acknowledge-abuse
  • The mentioned output happened when running rclone lsd mega: (process it's killed)

From docs:

Note that some have found issues with passwords containing special characters. If you can not log on with rclone, but MEGAcmd logs on just fine, then consider changing your password temporarily to pure alphanumeric characters, in case that helps.

Yes, I've already read the docs and my password/account doesn't have any special characters (as mentioned in the description). When I read this note the password was changed.

As a addition, I used the same password in the two accounts for test purposes — one works, and other not.

It is not clear for me why it fails.

rclone is using GitHub - t3rm1n4l/go-mega: A client library in go for mega.co.nz storage service and it is probably not up to date with mega APIs.. maybe there are some differences for Pro II accounts. Or mega changed something... If so I would not expect it to be fixed quickly.

megacmd webdav is much better option (it is also much faster) so I would rather spend time investigating why it disconnects after 1min - you might have much better chance of fixing it with mega community help.

Thanks @kapitainsky .
I will continue trying to search alternatives.

I testes on Windows and Mac as a workaround and works as expected, but all the commands sent to Mega takes ~3 minutes. It's so slow.

Maybe these it can be a issue related with Debian/Linux? I will try to reproduce in other Linux machine, without use on a cloud instance.

After test on another Distro (than Debian) I could list the Mega files (but still slow), I used Ubuntu on WSL2.

I will try to run an Ubuntu inside AWS and test again to check if the Linux distro can be the problem.

And what is the problem here? I have just tried with my mega account with 2FA on and it works like a charm via megacmd webdav.

If I correct remember, I had issues when synchronising a bulk of files (gigabytes) with copy process freezing.

It copies at the first minutes and after ~1min freezes. Only worked again when I kill the terminal and run it again.

After more some tests, I resolved the problem.

When the connection is unexpected killed "without any reason", the problem is related with the available resources, I was running on a EC2 t3.nano (2 vCPU and 0,5 GiB of RAM). After change instance type to increase available memory to 1GB I can list MEGA files.

Maybe add this note to the docs will save time for all.

1 Like

Definitely you should do it. Great investigation.

1 Like

PR sent: mega: Update mega.md with solution when receiving killed on process by tiagoboeing · Pull Request #7173 · rclone/rclone (github.com)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.