GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.61k stars 206 forks source link

ERROR: 400: Request contains an invalid argument.. Skipping message restore. #317

Closed ilium007 closed 3 years ago

ilium007 commented 3 years ago
❯ ./gyb --version                                                                                                                                                           52%   LIBERTY_AC 702 Mbps
Got Your Back 1.50
https://git.io/gyb
Jay Lee - jay0lee@gmail.com
Python 3.9.4 64-bit final
google-api-client 2.2.0
macOS-10.15.7-x86_64-i386-64bit x86_64
Path: /Users/xxxx/support/gyb_personal/gyb
OpenSSL 1.1.1k  25 Mar 2021
www.googleapis.com connects using TLSv1.3 TLS_AES_256_GCM_SHA384

I run this command: ❯ ./gyb --email xxxx@gmail.com --local-folder /Users/xxxx/support/gyb_xxxxx@xxxxx.com.au --action restore --label-restored restored

I get this error: ERROR: 400: Request contains an invalid argument.. Skipping message restore.

I seems this same issue may have been reported before and fixed in 1.4.1

jay0lee commented 3 years ago

The error indicates Gmail server did not like the message, it could be malformed or contain a virus, the server does not specify but there's really nothing GYB can do here except report the error and move on to the next email. This is working as intended. If it's just one or a handful of messages I'd suggest just ignoring it. Otherwise you'll need to investigate what's unique and problematic with that email.

Jay

ilium007 commented 3 years ago

Ok thanks. No viruses here :D I'll just ignore it.

ilium007 commented 3 years ago

How do I identify the email in question? I can't find anything in the --debug output to identify the actual email.

jay0lee commented 3 years ago

--debug output of a rerun should show the raw message. It's base64 encoded so you'll need to run it through a decoder (there's plenty of them online if you Google it).

Jay

On Wed, May 12, 2021, 7:29 AM ilium007 @.***> wrote:

How do I identify the email in question? I can't find anything in the --debug output to identify the actual email.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jay0lee/got-your-back/issues/317#issuecomment-839696250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDIZMHTZ6VHEQSPJLDVT4LTNJRARANCNFSM44YMXBBA .

ilium007 commented 3 years ago

Ahh ok - I was hoping there was a simple reference back to the local .eml file it used to attempt the restore.

ilium007 commented 3 years ago

So.... I decoded the base64 text and I remember the email. It was one that contained an AES encrypted attachment that contained a website SSL private key that I had to send to an overseas partner. It really urks me that Google will not allow us to securely send sensitive attachments that have been encrypted because they can't look inside them.

Not a GYB problem I know.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.