[Bug] LanguageTool firefox extension breaks Upwork's Messenger

Hello, for those who are unfamiliar with Upwork, it is a online platform for freelancers where people can hire them to perform work for a fee.

I have been working as a freelancer on Upwork for a few years now… since about 6 or more months I am unable to use their messenger from their website. I contacted their support a month ago and after a lot of investigation I found out that the LanguageTool addon for Firefox is causing the issue, if I disable the addon then the messenger will work, otherwise it won’t load.

Today I also tried adding upwork.com to the “Disable checking on these domains” list in the extension’s settings, that seemed to have fixed the issue too.

I have no idea what is preventing the messenger from loading from a technical perspective, and since the addon is not open source any more, I can’t debug the issue and potentially submit a patch either :frowning:

It would be awesome if the developers can take a look at this issue, I can help you acquire an account on Upwork for testing if your registration gets rejected by them (I think they have started to limit the people who can register as freelancers).

Hi, thanks for the report. This has already been fixed for the next release. I can send you a beta version if you’re interested (I’m not sure yet when the next release will be published).

1 Like

That is excellent news! I am interested in testing the beta version :slight_smile:

Also may I know the technical cause of this issue? I spent a good amount of time looking into the issue but could not find any specific point of failure…

I’ll send you the XPI via personal message. I’m not a JavaScript developer, but the change was to replace window.onerror = (errorMessage, fileName, lineNo, colNo, error) => by window.addEventListener("error", (event) =>.

Ah! I think I know why, window.onerror completely replaces any error handlers while window.addEventListener("error") adds it to a list of event handlers (allows multiple handlers). Your extension was probably overriding one of Upwork’s error handlers which was critical for loading the messenger :slight_smile:

I will take a look at the PM and test the beta addon!

I have tested the beta extension, the issue has been indeed solved, hurray for that! :partying_face:

But there are a few things of concern that I have noticed. As soon as I loaded the extension in debugging mode, I got this message from Firefox:

Reading manifest: Error processing offline_enabled: An unexpected property was found in the WebExtension manifest.

The offline_enabled property/option for web extensions is non-standard, and that is the reason why Firefox does not recognize it… I recommend removing this property from the manifest for the Firefox builds of the extension.

Though I am not sure how chrome changes its behaviour depending on this, it would be not good if chrome disables the extension when it is offline (as the property is set to false in the manifest right now). People can still use it on internal webpages with their local server while offline.

Just my 2 cents :slight_smile: