Mobile Hybrid Application throwing 500 error on all posts after update to Jira 7

I have a simple mobile hybrid application built for our in house IT team. The application is built in html/javascript in a Cordova wrapper and installed on IOS/Android devices. All requests to jira are made via ajax. Prior to the recent update to 7.0 everything worked smoothly, after the update every POST function is throwing a 500 error. Only the Post functions.

The shortest example would be hitting:{issuekey}/comment
using basic authentication in the headers, content type application/json, access-control-allow-origin set to *,

and a simple comment for the data field.
 {"body":"comment"} is the data being posted.

As a quick workaround, I setup some proxy api endpoints on a node server I already had in place. It makes the same calls as my application and passes the same data and the POST requests are successful. The main difference in the headers between the api proxy and my app are the origin...  when requests come from my phone the origin shows as "file://".

Any help figuring this out would be great. I have attached the error stack below.

The Error stack is huge, but here ya go...

1. message: "Expected authority at index 7: file://"
2. stack-trace: "java.lang.IllegalArgumentException: Expected authority at index 7: file://
 at at com.atlassian.applinks.cors.auth.DefaultCorsService.getApplicationLinksByOrigin( at com.atlassian.applinks.cors.auth.AppLinksCorsDefaults.allowsOrigin( at$1.apply( at$1.apply( at at at at at at at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept( at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept( at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept( at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept( at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept( at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest( at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest( at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest( at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest( at com.sun.jersey.spi.container.servlet.WebComponent.service( at com.sun.jersey.spi.container.servlet.ServletContainer.service( at$JerseyOsgiServletContainer.doFilter( com.sun.jersey.spi.container.servlet.ServletContainer.doFilter( at at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter( at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter( at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter( at at at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter( at at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter( at at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter( at at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter( at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.p… at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter( at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter( at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter( at com.atlassian.core.filters.AbstractHttpFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter( at com.atlassian.core.filters.AbstractHttpFilter.doFilter( at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter( at com.atlassian.core.filters.AbstractHttpFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.jira.web.filters.MultipartBoundaryCheckFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter( at com.atlassian.jira.web.filters.JiraFirstFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at com.atlassian.gzipfilter.GzipFilter.doFilterInternal( at com.atlassian.gzipfilter.GzipFilter.doFilter( at com.atlassian.jira.web.filters.gzip.JiraGzipFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.valves.AbstractAccessLogValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.AbstractHttp11Processor.process( at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process( at$SocketProcessor.doRun( at$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at org.apache.tomcat.util.threads.TaskThread$ at by: Expected authority at index 7: file:// at$ at$Parser.failExpecting( at$Parser.parseHierarchical( at$Parser.parse( at<init>( at ... 208 more"
3. status-code: 500

8 answers

Hi, I am having the same issue. Did you find a solution? Is this a cross domain issue?

I have not found a solution yet but have a support ticket in asking for help. Several of the errors in the stack do reference the DefaultCorsService, but I am not sure what needs to be done to remedy the issue... I will bring the solution here if support provides one.

I am having the same problem trying to create issues via the API. Status code 500 with the same error you are receiving. 

Any solution?

Same problem here.  Anything yet?

It is most likely a CORS issue. Problem for me is that we host our own JIRA server and my IT team is not up for allowing me to tweak settings and restart the server a few times to figure it out...

My temporary solution was to set up a node server and bounce my api calls off it. I had no issues with that but now I am maintaining two sets of code... sad

Hi, Have you found a solution? I have same issue and I don't want to use node js server, please help me 

Argh, I too am also getting this error.

On further investigation, I think there is a fix.
Seems to be a problem with tomcat. I cant seem to get it to work though even with tomcat 8.5 from latest JIRA install.

Ok I think I found something that will help us all out,
very last post. Just trying to figure out how to add it at the moment. As I'm a newbie to Tomcat.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

959 views 3 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you