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

Thunderbird (master branch) complains about messageDisplayScript undefined due to possible change of manifest version #5848

Closed
martgil opened this issue Oct 8, 2024 · 8 comments · Fixed by #5850
Assignees

Comments

@martgil
Copy link
Collaborator

martgil commented Oct 8, 2024

Description:

There's an error message saying that the usage of messageDisplayScript is undefined.

image

Upon checking, the Thunderbird 91 or older only supports messageDisplayScript for already opened pages https://webextension-api.thunderbird.net/en/91/messageDisplayScripts.html and so it does not work for Thunderbird client version128 ESR version or latest.

image

So from the latest documentation available at https://webextension-api.thunderbird.net/en/128-esr-mv2/messageDisplayScripts.html, it is suggested to use executeScript for maximum compatibility possible.

image

@martgil martgil self-assigned this Oct 8, 2024
@martgil martgil modified the milestones: 8.5.9, 8.5.8 Oct 8, 2024
@martgil martgil changed the title Thunderbird (master branch) complains about messageDisplayScript undefined due to deprecated API Thunderbird (master branch) complains about messageDisplayScript undefined due to possible change of manifest version Oct 9, 2024
@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

Taking a closer look of this issue, it seemed to have caused by the last changes related to change of manifest file that affects FlowCrypt for Thunderbird port.

image

This results to some MailExtension APIs being undefined.

@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

I'll prepare to migrate the existing code to manifest v3 as some parts of the build is still using manifest v2.

For me: https://webextension-api.thunderbird.net/en/beta-mv3/changes/128.html

@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

Another blocking issue is that the typescript typing for Thunderbird API we're using is still for Thunderbird version 127 ESR and not for major update 128 (beta) for version 3 - https://www.npmjs.com/package/@types/firefox-webext-browser

@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

Users can still use the current build for Thunderbird ESR version < 128 until the current build gets migrated to version 3 and the MailExtension API usages across the codebase.

The Thunderbird client app has this automatic update enabled by default so it looks like the planned migration is mandatory.

@sosnovsky
Copy link
Collaborator

Probably we can continue using manifest v2 for thunderbird until typescript typing will be updated?

@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

Yes @sosnovsky, I've tested it and the latest version of Thunderbird works well with manifest v2 extensions. Would you be okay with that if we continue using manifest v2 for the Thunderbird port? While the rest (chrome and firefox) builds uses v3.

@sosnovsky
Copy link
Collaborator

No issue with manifest v2 for thunderbird, as it's probably doesn't affect extension functionality and I'm not sure if we currently have any thunderbird users. So let's stick with it for now.

@martgil
Copy link
Collaborator Author

martgil commented Oct 9, 2024

Got it, thank you. I'll review and make a PR to fix this one. I am also hoping that I could somehow write a test for ensuring that the Thunderbird port has constant fixed manifest version v2 in case of a sudden change from our process for building manifest files. At least a test for static files' content is suffient - what do you think?

sosnovsky pushed a commit that referenced this issue Oct 15, 2024
* Use Manifest V2 for Thunderbird Port

* remove content_scripts for Gmail

* added test for Thunderbird manifest file

* revert changes

* refactor

* test permissions exclusive only for Thunderbird
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants