ysard / mintrayr

Mozilla extension: Minimize windows into the system tray (Firefox, Thunderbird, Seamonkey, Instantbird)
https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/
Mozilla Public License 2.0
130 stars 14 forks source link

Does not contain a valid install manifest #7

Open OndraM opened 5 years ago

OndraM commented 5 years ago

Hi, when installing the extension (latest version 1.4.6) to Thunderbird 60.0 (Linux), it is not present in extension list after restart and error console shows:

mintrayr - extension path:  /.../.thunderbird/.../extensions/mintray-reanimated@ysard.xpi  trayservice.jsm:66:5
mintrayr - extraction path:  /.../.thunderbird/.../extensions/mintray-reanimated@ysard  trayservice.jsm:72:5
1537869425819   addons.xpi-utils    WARN    updateMetadata: Add-on mintray-reanimated@ysard is invalid: Error: Directory /.../.thunderbird/.../extensions/mintray-reanimated@ysard does not contain a valid install manifest (resource://gre/modules/addons/XPIInstall.jsm:790:11) JS Stack trace: loadManifestFromDir@XPIInstall.jsm:790:11
loadManifestFromFile@XPIInstall.jsm:926:10
syncLoadManifestFromFile@XPIProvider.jsm:938:3
updateMetadata@XPIProviderUtils.js:1259:21
processFileChanges@XPIProviderUtils.js:1485:26
getNewSideloads@XPIProvider.jsm:3363:7

Do you have any idea whats wrong?

ysard commented 5 years ago

Hi, the paths are supposed to be like this example: /home/user_name/.thunderbird/random_letters.default/extensions/

I seem to have encountered this problem on Debian testing. I will double check that.

OndraM commented 5 years ago

Hi, thanks for quick reply. 1) Yes, I replaced them for the report, sorry for not mentioning this 2) The path to the .xpi exists, the path logged as "extraction path" does not (but it may eg. exists for a while during startup) 3) No, nothing like this 4) It is Arch Linux

ysard commented 5 years ago

From https://bugzilla.mozilla.org/show_bug.cgi?id=1486221#c16

Checked After installation, the extension appears in the extensions folder, but does not appear in the list of extensions in Tunberbird itself. And while it works. When minimized to minimize

ysard commented 5 years ago

The problem appears incomprehensibly: Tested with ubuntuzilla ppa (https://sourceforge.net/p/ubuntuzilla/wiki/Main_Page/), TB 60.0 and 60.2.1: Debian Stretch, normal session : the bug is here. Debian Stretch, root session: the bug disappears. Debian Jessie, normal session: no problem.

One solution would be to export the libraries to a folder other than "extensions/", but the files will not be deleted automatically if the addon is uninstalled.

kolinger commented 5 years ago

Looks like Thunderbird tries to load extension from folder instead of XPI file? In this case error message makes sense - extracted extension does not have valid manifest because there is none.

Extract/unpack whole extension instead of only /lib may help? Don't know what Thunderbird will do if there are two copies of extension. Unpacking everything and delete XPI? Hard to say what Thunderbird will do in these cases.

Or as you say change name and or path. Maybe there is some "uninstall" event? So we can listen when is extension removed and do cleanup?

ysard commented 5 years ago

Yes, in fact the procedure of extraction is ok, but just after it, the XPI installer of Thunderbird checks the content of the any folder created by the addon in the "extension/" folder. For a strange reason it does not happen systematically...

In this code dating from 2016 we see that this fragment towards the opening of the XPI or folder: https://searchfox.org/mozilla-central/rev/572e74ee991bbfd812766b4524237eb77577a4b1/toolkit/mozapps/extensions/internal/XPIProvider.jsm

This code is largely modified since the arrival of webextensions, it is difficult to know if the trick will work for a long time.

In addition, the idea of using install/uninstall pre-procedures already exists; these are supported in bootstrap addons (restartless); but as this one uses massively the system of overlays, it introduces a mass of consequent work which seems disproportionate for a system in end of support :/

kolinger commented 5 years ago

Looks like #7 is another case when modifying extensions folder doesn't work properly. It is strange that every installation of thunderbird works differently.

If there is no easy way to hook cleanup procedure then we just note this in readme/description? When uninstalling they also need to remove ~/.thunderbird/mintrayr-reaminated (%APPDATA%/Thunderbird/mintrayr-reaminated)?

Not ideal but better this then nothing I guess.

ilias63 commented 5 years ago

Hello.

Same issue for me using xenial (xubuntu 16.04.5 64bit) and thunderbird 60.2.1 I tried both 1.4.4 and 1.4.6 versions and always i am getting the same error message at console:

(thunderbird:10688): Gtk-WARNING : Theme parsing error: :1:34: Expected ')' in color definition (thunderbird:10688): Gtk-WARNING : Theme parsing error: :1:77: Expected ')' in color definition console.log: "mintrayr - extension path: " "/home/user/.thunderbird/ikppyu5a.default/extensions/mintray-reanimated@ysard.xpi" console.log: "mintrayr - extraction path: " "/home/user/.thunderbird/ikppyu5a.default/extensions/mintray-reanimated@ysard" 1539709847873 addons.xpi-utils WARN updateMetadata: Add-on mintray-reanimated@ysard is invalid: Error: Directory /home/user/.thunderbird/ikppyu5a.default/extensions/mintray-reanimated@ysard does not contain a valid install manifest (resource://gre/modules/addons/XPIInstall.jsm:790:11) JS Stack trace: loadManifestFromDir@XPIInstall.jsm:790:11 loadManifestFromFile@XPIInstall.jsm:926:10 syncLoadManifestFromFile@XPIProvider.jsm:938:3 updateMetadata@XPIProviderUtils.js:1259:21 processFileChanges@XPIProviderUtils.js:1485:26 getNewSideloads@XPIProvider.jsm:3363:7 >

I am wondering why when this message appears the add-on works but it does not appear in extensions menu or under add-ons menu. Some times thunderbird loads without any error and those times I can see the add-on in extension menu and under add-ons menu but it does not work.

I fully deleted /.thunderbird from my /home to remove any conflict and although the directory was recreated the issue persists.

I have to mention that I installed the 1.4.4 version on another older machine using xenial 16.04.5 32 bit and works fine with thunderbird 60.2.1.

Any help would be greatly appreciated.

ysard commented 5 years ago

@ilias63 : Thank you for your report, the bug is very confusing and I still do not know why it appears or how to solve it. Indeed, the behavior sometimes changes on similar configurations or on the same machine with another user account...

ilias63 commented 5 years ago

Hi, thank you for your quick reply.

I tried for several hours and in various ways to overcome the issue but I did not succeed anything. Do you think a solution or an update will be released shortly?

Your add-on is very useful and the new version works for my older machine (xenial 16.04.5 32 bit) better than the older one because now works fine the 'minimize and close' option which it did not with the previous one (it worked for me only the 'minimize' option).

Tomorrow or the day after tomorrow I will copy the whole /.thunderbird from my '32 bit' system and I will paste it in my /home of my '64 bit' system hoping that the issue will be overcame.

ysard commented 5 years ago

Tomorrow or the day after tomorrow I will copy the whole /.thunderbird from my '32 bit' system and I will paste it in my /home of my '64 bit' system hoping that the issue will be overcame.

It could be an idea :)

I think that we have to wait a little longer for the support of webextensions in Thunderbird. With that it will probably be possible to do something cleaner under Linux :)

ilias63 commented 5 years ago

One more think I want to report is that when the add-on appears under add-ons menu although I click on it no gui menu opens to configure it. When I try to configure it using config.editor no entries appear. If I close the application and I open it again and although this time the add-on does not appear under add-ons menu it works properly and it is configurable using config.editor.

I will report here the copy-paste procedure's result.

Regards.

ilias63 commented 5 years ago

I copied/pasted the whole /.thunderbird from my 32 bit system to my 64 bit system and the issue is still here. I can see that although I copied the /extensions/mintray-reanimated@ysard when I first opened thunderbird this directory (/mintray-reanimated@ysard) was deleted and did not not be re-created. I let the add-on run and other times works and it minimizes thunderbird to tray and other it doesn't. For the moment it is better than no minimize to tray at all. Any new release fixing this issue would be greatly welcomed.

ysard commented 5 years ago

Thank you for the test, so as I thought it is a behavior that is not related to a setting in the profile.

ysard commented 5 years ago

Hi, here you will find a specific version for the current problem: https://github.com/ysard/mintrayr/releases/tag/1.4.6dev But keep it mind that it is not a clean way to install an addon...

ilias63 commented 5 years ago

Thank you for you reply. Do I have to install this https://github.com/ysard/mintrayr/releases/download/1.4.6dev/mintrayr-1.4.6dev.xpi add-on through 'install Add-on from a file' or manually extract it in a folder other than "extensions'. I am little confused.

ysard commented 5 years ago

@ilias63 : It is the final xpi file that you can "Install from a file" :)

ilias63 commented 5 years ago

Hello. It works ! Add-on appears when the application restarts and is configurable clicking on it under Add-ons menu. Is there any option to rename the folder? I would prefer not to see this 'alert' : DO_NOT_TRY_THIS_AT_HOME A name like 'mintrayr_data_pre-lease' would be fine.

bollergio commented 5 years ago

Hi ysard I tried all the suggestions above and I see the add-on in the list but I can not edit anything, also add-on preference doesen't anything and then if I close thunderbird it doesen't go in the tray but ends What can I send to check?

thank you

ysard commented 5 years ago

@bollergio : In the preferences of the addon you must check the options according to the behavior you want. If despite this, the behavior of the addon is not as expected, please create an issue on my repository to search more precisely the origin of the problem.

@ilias63 : Since this is not a standard folder, I do not recommend its use. In 6 months when a new Thunderbird update will make this addon almost useless with the removal of overlays and the removal of non-restartless addons, you will no longer remember that this folder needs to be removed from your profile. I'm sorry to introduce this "Windows-like" behavior which is that software install themself wherever they want, in a GNU/Linux system; so this notation is a warning.

Also, I am working on a complete rewrite of a similar extension for the new versions of Thunderbird.

bollergio commented 5 years ago

hi again, and thanks for the reply at the first time the issue seams to be like this #7 (does not contain a valid install manifest)

after trying some suggestion now i've got the add-on in list, but i can't edit any preferences see this screenshot: add on

is it better to open a new issue ?

ilias63 commented 5 years ago

OK. Thank you. For me is fine now as it works perfectly. I can live with this folder name but in the meantime I was wondering if it was easy to be renamed. Please let us know the time when a new similar extension for the new versions of Thunderbird will be available.

ysard commented 5 years ago

@bollergio : You are not installing the right addon (I read revived in the image instead of reanimated): https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/ or more recent: https://github.com/ysard/mintrayr/releases (the 1.4.6dev if you are experimenting the issue #7, or the 1.4.6 otherwise)

tenet55 commented 5 years ago

Just installed the latest update 1.4.6dev, everything now works except when I click the X for close it doesn't minimise to tray even though its set to -> Instead of closing and when minimising.

Here is what the error log shows now.

Could not read chrome manifest 'file:///usr/lib/thunderbird/chrome.manifest'.
mintrayr - extension path:  /home/test/.thunderbird/tx2r1jpp.default/extensions/mintray-reanimated@ysard.xpi  trayservice.jsm:66:5
mintrayr - extraction path:  /home/test/.thunderbird/tx2r1jpp.default/mintrayr_data_DO_NOT_TRY_THIS_AT_HOME  trayservice.jsm:73:5
NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:179

Also it doesn't have an option for updating the tray icon with the amount of unread emails, although I'm not sure if your addon ever had this feature or if it was one of the other ones. Edit: The OS is Mint 18.3. Thanks

ysard commented 5 years ago

@tenet55 : Thank you for the report. If the option "Use for Messenger windows" is checked in the preferences of the addon ("Thunderbird" tab), It may be a specific bug due to Cinnamon or MATE Desktop Environments, because the problem is not present on KDE and Gnome :/

This event is used: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Events/close_event

Also, there is no display of the number of mails on this addon.

bollergio commented 5 years ago

@bollergio : You are not installing the right addon (I read revived in the image instead of reanimated): https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/ or more recent: https://github.com/ysard/mintrayr/releases (the 1.4.6dev if you are experimenting the issue #7, or the 1.4.6 otherwise)

may i have a log to check the error ? thanks

ysard commented 5 years ago

@bollergio: Ok, the options accessible like old an new options of addons from the drop-down menu of the main window: "Tools / add-ons options" as shown here: https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57#Removed_and_changed_in_mozilla59

bollergio commented 5 years ago

i can see also in the drop down menu, but it seems that it has no effect no new windows or popups

ysard commented 5 years ago

And with these options checked ? image

tenet55 commented 5 years ago

@tenet55 : Thank you for the report. If the option "Use for Messenger windows" is checked in the preferences of the addon ("Thunderbird" tab), It may be a specific bug due to Cinnamon or MATE Desktop Environments, because the problem is not present on KDE and Gnome :/

This event is used: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Events/close_event

Also, there is no display of the number of mails on this addon.

Thanks, that fixed it. Everything works perfectly now.

mintraypref

I'm using Mint Mate 18.3 btw. Will update this thread when I test this plugin on Mint Mate 19 and thunderbird 63.

ysard commented 5 years ago

@tenet55 : I did not find a release date for Thunderbird 63, where is your source ? This addon will not pass Thunderbird 63. There are many changes to make and I think this time is invested in pure loss because in the medium term it has no chance to work given the technologies on which it is based . I would have liked to concentrate on new bases.

tenet55 commented 5 years ago

@tenet55 : I did not find a release date for Thunderbird 63, where is your source ? This addon will not pass Thunderbird 63. There are many changes to make and I think this time is invested in pure loss because in the medium term it has no chance to work given the technologies on which it is based . I would have liked to concentrate on new bases.

63 is still in beta and I haven't seen a release date yet.

bollergio commented 5 years ago

And with these options checked ?

i'm on Ubuntu

bollergio commented 5 years ago

hi there a button appear in my customize menu, so i've put on the bar see pic screenshot from 2018-10-24 12-52-45

is this button caused by "mintrayr" ? in any case if i press it the TB hide somewhere but i can't see any icons in the tray i'de like to remember that i'm behind an Ubuntu 16.04.5 OS

thanks a lot

ysard commented 5 years ago

@bollergio : Yes this button is related to mintrayr, but until now, the minimization was done correctly. Maybe you should check "Show always" to temporarily fix this problem.

proninyaroslav commented 5 years ago

I see the problem returned after the commit bbf8eb3 was reversed. Will there be a fix?

togipagim commented 5 years ago

removing the hyphen ("-") from <em:id>mintray-reanimated@ysard</em:id> in install.rdf addresses the issue for me. I'm using Mate Desktop on Fedora Linux.

however, both "mintrayreanimated@ysard" and "mintrayreanimated@ysard.xpi" end up in my extensions folder, which has a side effect of requiring the user to remove the extension twice if they want to uninstall.