Mega user won't log on, but MEGAcmd works fine

What is the problem you are having with rclone?

I am trying to set up a new remote, using Storage: mega for the first time

When I try to list the contents of the remote I get the error

couldn't login: Object (typically, node or user) not found

yet when I use the MEGAcmd command line utility, with the same user and password, it works fine

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

> rclone --version
rclone v1.58.1
- os/version: darwin 12.3.1 (64 bit)
- os/kernel: 21.4.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.18.1
- go/linking: dynamic
- 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 ls my-mega: -vv

The rclone config contents with secrets removed.

> cat _rclone.conf
type = mega
user =
pass = an-oBScur3d-h4$H_0F-my_pAs$w0rd

A log from the command with the -vv flag

> rclone ls my-mega: -vv
2022/05/24 16:02:28 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "--config=/mypath/_rclone.conf" "--modify-window" "2s" "ls" "my-mega:" "-vv"]
2022/05/24 16:02:28 DEBUG : Creating backend with remote "my-mega:"
2022/05/24 16:02:28 DEBUG : Using config file from "/mypath/_rclone.conf"
2022/05/24 16:02:28 Failed to create file system for "my-mega:": couldn't login: Object (typically, node or user) not found

> rclone mount my-mega: mega-path
2022/05/24 16:09:12 Failed to create file system for "my-mega:": couldn't login: Object (typically, node or user) not found

Further information

MEGAcmd works fine

I downloaded the .dmg from Mega to install their command line tool.
When I used the same user and password that I typed into rclone config the connection goes through fine...

> /Applications/

|                     __  __ _____ ____    _                      _                     |
|                    |  \/  | ___|/ ___|  / \   ___ _ __ ___   __| |                    |
|                    | |\/| | \  / |  _  / _ \ / __| '_ ` _ \ / _` |                    |
|                    | |  | | /__\ |_| |/ ___ \ (__| | | | | | (_| |                    |
|                    |_|  |_|____|\____/_/   \_\___|_| |_| |_|\__,_|                    |
|                                                                                       |
|             Welcome to MEGAcmd! A Command Line Interactive and Scriptable             |
|                    Application to interact with your MEGA account.                    |
|               Please write to if you find any issue or                |
|                  have any suggestion concerning its functionalities.                  |
|       Enter "help --non-interactive" to learn how to use MEGAcmd with scripts.        |
|             Enter "help" for basic info and a list of available commands.             |
[Initiating server in background. Log: /Users/me/.megaCmd/megacmdserver.log]
MEGA CMD> login
[API:info: 14:45:35] Fetching nodes ...
Fetching nodes ||###############################################||(44/44 KB: 100.00 %)
[API:info: 14:45:36] Loading transfers from local cache
[API:info: 14:45:36] Login complete as$ ls
File1$ logout
Logging out...
MEGA CMD> exit

Settings in MEGA account

  • Plan
    • Account Type - Plan : Free
  • Session History
    • Last 10 sessions: Clients
      • Chrome on Apple - Current
      • MEGAcmd on Apple - Expired
      • nothing else appears

setting up the remote

I used the same user and password (entered twice) to set up the remote that I did in the browser AND in MEGAcmd, but for some odd reason rclone won't log me in!

> rclone config
n) New remote
e/n/d/r/c/s/q> n
name> my-mega
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
26 / Mega
   \ (mega)
Storage> mega
Option user.
User name.
Enter a value.
Option pass.
Choose an alternative below.
y) Yes, type in my own password
g) Generate random password
y/g> y
Enter the password:
Confirm the password:
Edit advanced config?
y) Yes
n) No (default)
type = mega
user =
pass = *** ENCRYPTED ***
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
Current remotes:

Name                 Type
====                 ====
my-mega              mega

q) Quit config
e/n/d/r/c/s/q> q

Other information

  • I am setting this up this remote for the first time, but I have not yet gotten rclone to connect
  • I am not performing any repetitive bulk actions, just testing the remote on the command line
  • I tested with the mount command (see -vv output above) which also fails

That generally happens when the password is wrong and/or not obscured.

I assume you just ran through the config and typed in the password?

Yes, @Animosity022 I typed the password in, where it prompted me to 'type in my own password'. When I looked inside the rclone.conf the pass = had been obscured for me.

During my various attempts at making this work I stopped short of trying rclone osbsure MyP4$5w0rd as I did not want to expose the actual password on the command line. Do you have any suggestion of how I can obscure the password by typing it into a prompt so it cannot be scraped or sniffed?

Typing it in should be fine as that'll do it for you.

Sure the password is correct as well? That's the only other item that error message generally means as you don't seem blocked to login.

Well, thanks to your prompting, @Animosity022 , I wondered if my password content might have been the issue, so I changed my password to remove the special characters like £ or $ (and just added a handful more alphanumerics instead) and now that works a treat!

I wonder if that is a limitation of the libraries rclone uses to implement the mega back-end? Unfortunately I don't have the time to test and report right now, but I'm really grateful that you lead me to the resolution of my issue.

Many thanks

The library rclone uses was reverse engineered from the (very messy) C++ source code that mega supply for their SDK.

There are definitely problems with strange characters in passwords - we just haven't worked out why!

We should probably write something about this in the docs: rclone/ at master · rclone/rclone · GitHub - if you want to suggest something click the pencil icon and make an edit for us to review.

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