Closed Bug 1209117 Opened 9 years ago Closed 8 years ago

Chat broken when lightning is deployed in distribution/bundles

Categories

(Calendar :: General, defect)

Lightning 4.0.2.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: daniel, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image lightning_bundle.png
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36

Steps to reproduce:

I deploy Lightning by extracting the XPI content into C:\Program Files (x86)\Mozilla Thunderbird\distribution\bundles\lightning

Until now, it has been working fine, but since version 4, it's still working, but it breaks the chat interface, see the attached screenshot


Actual results:

Access to the chat interface is broken: it displays a messed up view of the calendar instead.


Expected results:

Chat interface should still be available when Lightning is deployed in C:\Program Files (x86)\Mozilla Thunderbird\distribution\bundles\lightning
According to Bug 1144127 support for distribution/bundles was removed in Thunderbird 40 and newer. Thunderbird 38 and newer already include Lightning in the installation package. You can find it in <Thunderbird-Install-Folder>\distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}. Why do you need to copy it again?
I wasn't aware of that change, and I can't believe what I read in this bug. This change is such a non sens.....
The distribution/bundles is much better for enterprise deployement (you have full control: you can upgrade it independently, downgrade, prevent users from disabling the extension, save disk space as the extension won't be copied over every user profiles etc...)

And all this is removed for absolutly no gain at all (if a malicious software has write access to the distribution/bundles dir, it can replace the FF/TB binary completely)

Anyway (sorry for the rant, you're not responsible :-)) TB38 for now still support bundles, so I think fixing this worth it for those like me who use this method.
Also, Mike Kaply has a workaround to bring the distribution/bundles support back even after v40 (using AUtoConfig)
I think this is WONTFIX once we get past TB 40 since it's an unsupported configuration.

Are there errors in the error console? I have no idea why this would be happening.
The only critical error during startup is:

Horodatage : 02/10/2015 17:25:35
Erreur : TypeError: tab is undefined
Fichier Source : chrome://messenger/content/tabmail.xml
Ligne : 1067


There's also this warning:

Horodatage : 02/10/2015 17:25:38
Avertissement : Use of doQueryInterface() is deprecated and will be removed with the next release. Use XPCOMUtils.generateQI() instead.
1: [resource://calendar/modules/calUtils.jsm -> file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/calendar-js/calUtils.js:794] doQueryInterface
2: [file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/sogo-connector/components/CalDAVACLManager.js:1411] cDACLM_QueryInterface
3: [resource://gre/modules/XPCOMUtils.jsm:292] XPCOMUtils__getFactory/factory.createInstance
4: [resource://calendar/modules/calProviderUtils.jsm:570] cal.ProviderBase.prototype.aclManager
5: [file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/components/calDavCalendar.js:1340] caldav_safeRefresh
6: [file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/components/calDavCalendar.js:2293] caldav_completeCheckServerInfo
7: [file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/components/calDavCalendar.js:2257] caldav_cPNS_oSC
8: [file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/components/calDavCalendar.js:354] oauthCheck
9: [null:0] null

Fichier Source : file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/distribution/bundles/lightning/calendar-js/calUtils.js
Ligne : 792
The tabmail error is Bug 1070630 but I'm not aware of any issues caused by this.

The warning is issues by Lightning itself to inform extension developers that this function will be removed from Lightning in the future.

The old documentation on distribution/bundles states: "The directory containing the add-on must be named the same as the ID of the add-on or theme."
> https://developer.mozilla.org/en-US/Add-ons/Extension_Packaging#Including_add-ons_in_a_customized_application

The Lightning ID is {e2fda1a4-762b-4020-b5ad-a41df1933103}, therefore please ensure that you are using the correct folder name. As Lightning is already shipped in distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103} maybe you can just move it to distribution\bundles\{e2fda1a4-762b-4020-b5ad-a41df1933103}. There might be conflict between the two installations.

The attached screenshot shows the usual display if you installed an incompatible Lightning release, e.g. based on different Gecko version or different platform. Can you state the Lightning version and platform you are trying to use?
(In reply to Stefan Sitter from comment #6)
> The old documentation on distribution/bundles states: "The directory
> containing the add-on must be named the same as the ID of the add-on or
> theme."
> > https://developer.mozilla.org/en-US/Add-ons/Extension_Packaging#Including_add-ons_in_a_customized_application
> 
> The Lightning ID is {e2fda1a4-762b-4020-b5ad-a41df1933103}, therefore please
> ensure that you are using the correct folder name.

That's strange. It always worked using any arbitrary folder name. And in fact, it's still working: Lightning itself has no problem. It just prevents access to the chat tab. Anyway, I tried using distribution\bundles\{e2fda1a4-762b-4020-b5ad-a41df1933103} with exactly the same result.

> As Lightning is already
> shipped in distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}
> maybe you can just move it to
> distribution\bundles\{e2fda1a4-762b-4020-b5ad-a41df1933103}. There might be
> conflict between the two installations.

I removed the distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103} already to prevent conflict and keep control over the version deployed.

> 
> The attached screenshot shows the usual display if you installed an
> incompatible Lightning release, e.g. based on different Gecko version or
> different platform. Can you state the Lightning version and platform you are
> trying to use?

I'm seeing this issue on Windows 7 Pro x64 with Thunderbird 38.3.0 (was the same with 38.2.0) and lightning 4.0.2.1.

I don't think it can be a version mismatch, as lightning itself is working. Only the chat is broken. And this only happens when deployed as a bundle, if I install the same version through the extension manager,
Maybe this was another artefact of bug 1211160, which was fixed for TB 38.6.0. Does the issue still persist with that version?
(In reply to MakeMyDay from comment #8)
> Maybe this was another artefact of bug 1211160, which was fixed for TB
> 38.6.0. Does the issue still persist with that version?

Yes, this issue persists with 38.6.0
So what is the core issue that still remains?

As stated, distribution/bundles will not work in Thunderbird after 40.

Are you still using distribution/bundles and seeing the error?
I still running TB 38 for now. Yes, I'm still using distribution/bundles, and I hope it'll work after TB 40 with your workaround. The issue stays the same as reported in the bug description: when deployed using distribution/bundles, Lightning itself is working, but it completely breaks the Chat interface.
Attached image lightningchatbug.jpg
This image shows exactly what the problem is.

In the distribution case, the lightning bundle is loaded earlier than chat and so the calendar vbox is before the chat window in the DOM.

In the extension case, the calendar vbox is after the chat vbox.

I believe this is a bug in thunderbird. It seems to be assuming that the chat vbox is the second in the tab panel and it's not guaranteed to be. It should be using an ID and activating it by ID.
Florian:

Is this instantbird?
Flags: needinfo?(florian)
I would guess the order in which http://mxr.mozilla.org/comm-central/source/mail/components/im/content/chat-messenger-overlay.xul and the lighting XUL overlay are loaded differ between the bundle and extension cases. And no, this isn't Instantbird, Instantbird is a standalone XUL application (in the im/ top level folder in comm-central), chat in TB is in mail/components/im, and in bugzilla in "Thunderbird :: Instant Messaging".
Flags: needinfo?(florian)
This doesn't happen anymore since TB 45.1.0 with lightning 4.7 deployed as a bundle (bundle support re-enabled using Mike Kaply's dist-bundle script), so I guess the bug can be closed
Thanks for the update!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.