Skip to content

Failed to restore MBox from Google Takeout > Invalid label name - invalidArgument #518

@gomski-didit

Description

@gomski-didit

gyb --version
Got Your Back 1.95
git.io/gyb
Jay Lee - jay0lee@gmail.com
Python 3.13.7 64-bit final
google-api-client 2.181.0
macOS-15.7.1-arm64-arm-64bit-Mach-O arm64
Path: /Users/xxx/bin/gyb
ConfigPath: /Users/xxx/bin/gyb
OpenSSL 3.5.2 5 Aug 2025

command used:
gyb --email xxx@xxx --action restore-mbox --local-folder ./Gmail --service-account --extra-reserved-labels muted --debug > label-failure-output.txt

debug output:
connect: (oauth2.googleapis.com, 443)
send: b'POST /token HTTP/1.1\r\nHost: oauth2.googleapis.com\r\nContent-Length: 842\r\ncontent-type: application/x-www-form-urlencoded\r\nx-goog-api-client: gl-python/3.13.7 auth/2.40.3 auth-request-type/at cred-type/sa\r\nuser-agent: Got Your Back 1.95 | git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.13.7 64-bit final | google-api-client 2.181.0 | macOS-15.7.1-arm64-arm-64bit-Mach-O arm64\r\naccept-encoding: gzip, deflate\r\n\r\n'
send: b'assertion=xx&grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 28 Oct 2025 11:33:01 GMT
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Content-Type: application/json; charset=utf-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Server: scaffolding on HTTPServer2
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked
connect: (oauth2.googleapis.com, 443)
send: b'POST /token HTTP/1.1\r\nHost: oauth2.googleapis.com\r\nContent-Length: 842\r\ncontent-type: application/x-www-form-urlencoded\r\nx-goog-api-client: gl-python/3.13.7 auth/2.40.3 auth-request-type/at cred-type/sa\r\nuser-agent: Got Your Back 1.95 | git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.13.7 64-bit final | google-api-client 2.181.0 | macOS-15.7.1-arm64-arm-64bit-Mach-O arm64\r\naccept-encoding: gzip, deflate\r\n\r\n'
send: b'assertion=xxx&grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 28 Oct 2025 11:33:02 GMT
header: Pragma: no-cache
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Content-Type: application/json; charset=utf-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Server: scaffolding on HTTPServer2
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked
connect: (gmail.googleapis.com, 443)
send: b'GET /$discovery/rest?version=v1 HTTP/1.1\r\nHost: gmail.googleapis.com\r\ncontent-length: 0\r\nuser-agent: Python-httplib2/0.30.0 (gzip)\r\naccept-encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: content-type: application/json; charset=UTF-8
header: vary: Origin
header: vary: X-Origin
header: vary: Referer
header: content-encoding: gzip
header: date: Tue, 28 Oct 2025 11:33:02 GMT
header: server: ESF
header: x-xss-protection: 0
header: x-frame-options: SAMEORIGIN
header: x-content-type-options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked

Using backup folder ./Gmail

Restoring from 2.68gb file ./Gmail/Alle E-Mails einschließlich Spam-Nachrichten und E.mbox...
send: b'GET /gmail/v1/users/me/labels?fields=labels%28name%2Cid%2Ctype%29&prettyPrint=true&alt=json HTTP/1.1\r\nHost: gmail.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: Got Your Back 1.95 | git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.13.7 64-bit final | google-api-client 2.181.0 | macOS-15.7.1-arm64-arm-64bit-Mach-O arm64 (gzip)\r\nx-goog-api-client: gdcl/2.181.0 gl-python/3.13.7 cred-type/sa\r\ncontent-length: 0\r\nauthorization: Bearer xxx7\r\nx-allowed-locations: 0x0\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: content-type: application/json; charset=UTF-8
header: vary: Origin
header: vary: X-Origin
header: vary: Referer
header: content-encoding: gzip
header: date: Tue, 28 Oct 2025 11:33:02 GMT
header: server: ESF
header: x-xss-protection: 0
header: x-frame-options: SAMEORIGIN
header: x-content-type-options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked

Creating label Archiviert
send: b'POST /gmail/v1/users/me/labels?fields=id&prettyPrint=true&alt=json HTTP/1.1\r\nHost: gmail.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: Got Your Back 1.95 | git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.13.7 64-bit final | google-api-client 2.181.0 | macOS-15.7.1-arm64-arm-64bit-Mach-O arm64 (gzip)\r\nx-goog-api-client: gdcl/2.181.0 gl-python/3.13.7 cred-type/sa\r\ncontent-type: application/json\r\ncontent-length: 91\r\nauthorization: Bearer xx\r\nx-allowed-locations: 0x0\r\n\r\n'
send: b'{"labelListVisibility": "labelShow", "messageListVisibility": "show", "name": "Archiviert"}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: vary: Origin
header: vary: X-Origin
header: vary: Referer
header: content-type: application/json; charset=UTF-8
header: content-encoding: gzip
header: date: Tue, 28 Oct 2025 11:33:02 GMT
header: server: ESF
header: x-xss-protection: 0
header: x-frame-options: SAMEORIGIN
header: x-content-type-options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
header: Transfer-Encoding: chunked

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions