Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suddenly can't sync due to "Invalid label name" but no idea which label might be causing the problem #284

Open
ajmac opened this issue Jul 10, 2024 · 2 comments

Comments

@ajmac
Copy link

ajmac commented Jul 10, 2024

I've been using lieer for a few years now and it's generally been great (thank you), but recently I've been unable to sync due to the following error message:

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://gmail.googleapis.com/gmail/v1/users/REDACTED/labels?alt=json returned "Invalid label name". Details: "[{'message': 'Invalid label name', 'domain': 'global', 'reaso
n': 'invalidArgument'}]">

I've checked my notmuch tags using notmuch search --output=tags '*' but nothing looks amiss to me. How can I find which tag is being choked on?

@wu0lss4j
Copy link

try running again the sync, pull, or posh, with -v, then -vv and check all 1 to 3 lines exactly before the error, it can be that you have a tag/label that cannot be pushed to gmail

@mboehn
Copy link

mboehn commented Jan 18, 2025

Okay, I might have had the same problem. I tried using --logging_level without any luck, but when I did a gmi sync --dry-run I got to see the tags. In my case it's pretty obvious that it's the '\x1b' tag that's causing trouble.

❯ gmi sync --dry-run
dry-run: True
receiving metadata: 100%|>████████████████████████████████████████████████████| 7/7 [00:00<00:00, 101.68it/s]
resolving changes: 0%| | 0/7 [00:00<?, ?it/s]
(dry-run) gid: 19476c75411b0f5a: add: ['\x1b'], remove: []
(dry-run) gid: 193f8e3be3387617: add: [], remove: ['INBOX']
(dry-run) gid: 193f801307f449fa: add: [], remove: ['INBOX']

I could then search for the tag and remove it.

❯ notmuch dump | grep '1b '
+%1b +inbox +sent -- id:202501180.....

Hope this helps you.
(\x1b is ascii control code 'escape', so I guess there is an input in either neomutt or alot that accepted me pressing ESC as a tag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants