Skip to content

Automatic Add Tags not working – curr_prompt is undefined #855

Description

@antoira27

The problem

Hi, I’m having an issue with the Add Tags function.

I configured Add Tags to use the official OpenAI API with a valid API key and a selected model. Automatic tagging is enabled, the required permissions are active, and “force existing tags” is enabled.

There is also a strange behaviour with the main “Add Tags to emails” option: when I enable the checkbox, it appears enabled while the options page is open, but after closing and reopening the ThunderAI settings the checkbox appears disabled again.

However, with debug enabled, ThunderAI reports:

Options restoring add_tags = true

so it seems the option is actually being saved internally even though the checkbox does not remain visually enabled.

When a new email arrives, ThunderAI detects it correctly and starts processing it, but then stops with:

can't access property "define_response_lang", curr_prompt is undefined

I also tried restoring the Add Tags prompt to its default version and restarting Thunderbird, but the same error still occurs.

The Add Tags command also does not appear in the ThunderAI menu.

Thanks in advance for any help.

Which Operative System are you using?

Windows 11

Which version of Thunderbird are you using?

Version 153.0.2

Which version of ThunderAI has the issue?

4.1.1.0

Which integration are you using?

OpenAI ChatGPT API

Anything in the Thunderbird console logs that might be useful?

[ThunderAI Logger | mzta-background] New mail received
[ThunderAI Logger | mzta-background] Folder: Posta in arrivo
[ThunderAI Logger | mzta-background] Starting from the HTML body if present and converting to plain text...

[ThunderAI Logger | mzta-background] Error processing message, skipping: can't access property "define_response_lang", curr_prompt is undefined

Additional information

I tested this both with my custom Add Tags prompt and after restoring the default Add Tags prompt.

The error is the same in both cases.

I’ve attached a screenshot of the ThunderAI debug console showing the error.

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstatus: ready for releaseWork complete in the next release branch.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions