Recent Chrome instability with Jira, MIME incorrect on built-in javascripts

Błażej O_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2013

Hello.

I have a serious problem with Jira/Chrome compatibility in our company. It all started about 1-2 weeks ago. Chrome seems to be denying to execute various javascripts and ajax in the jira, therefore most menus, popup windows (like issue creation or work logging) simply won't work. Hard-refresh does the trick of putting things back to the normal state, but it seems to fall apart again just a few clicks later.

One of our developers pointed to the fact that chrome refuses to execute some scripts while displaying jira, because they have incorrect MIME type. Google says that turning off "x-content-type-options:nosniff header" should be a quick workaround, but I'm concerned about weakening the security with such step.

Is there any way to force correct MIME type on jira's javascripts?

2 answers

1 accepted

0 votes
Answer accepted
Błażej O_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2013

The problem were related to three things:

*Not fully correct mime type on jira's javascript files

*IIS server passing information about incorrect myme types to browser

*Chrome getting the info and denying to execute the "uncertain type" scripts.

Having all three of these factors at the same time caused this strange behaviour. So removing any of these factors solves the problem:

JIRA: as developers stated: "It is a new thing that they are implementing to browsers to block incorrect mime type, we do agree on that. After a check on our end, we found that the mime type for js files is supposed to be <tt>Content-Type:application/javascript;charset=UTF-8</tt>. Probably that is the reason why it is throwing such error." So correcting mime-types in jira might be achievable, but definitely not immediate solution.

Chrome: changing the browser does the trick. But hey, you can't force people to just change browser :)

IIS: removing header "x-content-type-options:nosniff" from IIS settings solves the problem. However, be aware, that it means weakening the security of your Jira instance. If you have open Jira instance with external users (clients) be sure to avoid this solution.

We removed the nosniff and it works ok, however we use jira only internally in our network.

0 votes
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2013

check here, issue has submitted

https://jira.atlassian.com/browse/JRA-33376

and also have a look here

https://answers.atlassian.com/questions/158231/is-anyone-else-having-trouble-using-jira-5-2-10-with-chrome

Suggest an answer

Log in or Sign up to answer