Problem to login with mega

What is the problem you are having with rclone?

When I try to connect with mega, I get the following error:

Failed to create file system for "mega2:/:" couldn't login: illegal base64 data at input byte 22

What is your rclone version (output from rclone version)

`rclone version
 rclone v1.49.5
 - os/arch: linux/amd64
 - go version: go1.12.10`

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

Linux Debian 10 64 bits

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 mega2:/

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

rclone ls mega2:/ -vv
2019/10/12 16:05:29 DEBUG : rclone: Version "v1.49.5" starting with parameters ["rclone" "ls" "mega2:/" "-vv"]
2019/10/12 16:05:29 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2019/10/12 16:05:30 Failed to create file system for "mega2:/": couldn't login: illegal base64 data at input byte 22

The username is the email that has a period between the names:

Thank you

Hmm, I think we've seen this problem before.

Did it ever work?

Does it work if you leave it a bit and try again?

Can you try with the latest beta?

I have another mega account and it works perfectly.

However with this username does not work, I do not know if it can be by the point that has the name.

to my (newbie compared to NCW) understanding the error might indicate some sort of invalid or unexpected character in what it tries to log in with.

Could you perhaps post the relevant section from your rclone.conf file?
of course, obscure any passwords and such, but try to keep them in exactly the same format as much as you can.
rather than just removing them, replace some random characters with another equivalent ones so we can get a sense of if the syntax is wrong somehow - without you compromising the secure info.

Did you create this remote in a different way than you did the working one? Did you at some point copypaste any info into the config directly rather than using the rclone config tool?

It's not impossible, but it's not the first thing I would suspect because a . in an email is perfectly valid and it would have been a grave oversight if the mega API rejected it based on that... and presumably the coders weren't complete amateurs.

I tried making an accout with a . in the user part of the email like yours, but it worked fine...

Can you post the result of this please? Then I can work out which bit of the base64 data it is moaning about

rclone lsf mega2: -vv --dump bodies

If you don't want to post publically then email it to with a link to the forum post in the email.

The mega2 service was created with the rclone config statement, exactly the same as the one that works.

cat .config/rclone/rclone.conf 
type = mega
user =
pass = PKLCpzvNuvGelXALgK_1d4mazQwbxJOkbIlDXAo

type = mega
user =
pass = BNO6HeDM7OaCDRZ4eu889WmK9vPFDKzvaOHmgls

Don't see anything wrong here.
I don't really have much else to add to this problem then. Best follow NCW's sintructions and see if those logs reveal anything.

@josedom Thanks for the log file.

I've identified what is happening I think... The upstream library needed to be a bit more permissive when decoding base64 characters.

So can you try this? (uploaded in 15-30 mins)

Hello, I have tried the version that you have indicated to me, and now this error comes out:

> Failed to create file system for "mega2:/": couldn't login: Block decryption failed

I send the dump information to your email

Thank you

Same issue here.
Use rClone as a plugin to unRAID.
Other services work.
Not mega.