Exception: Uncaught SyntaxError: Unexpected token ILLEGAL while using Agile board

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Using Agile Board will lead to following exception as below:

 
Please try refreshing the page, or contact your administrator / Atlassian Support if the problem continues
Details
Exception: Uncaught SyntaxError: Unexpected token ILLEGAL
Resource: http://localhost:8080/secure/RapidBoard.jspa?rapidView=1&view=detail&selectedIssue=JAVA-6
Line: 5
Column: 48
Environment
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36
Stack trace
SyntaxError: Unexpected token ILLEGAL
at eval (native)
 
Or
 
Exception: ReferenceError: moment is not defined
 
Or
 
Exception: TypeError: GH.RapidBoard.BoardHeader is undefined

Diagnosis

Environment

  • Error encountered in all browser type

Cause

  • This is caused by a javascript that is appended to JIRA through fields/announcement banner
  • The javascript might have syntax error or operation that conflicts with JIRA

Resolution

  • Turn on safe mode in JIRA Administration > Add-ons > Manage Add-ons > Turn on Safe Mode to check if any add-ons that is causing this. Retest.
  • Remove the Javascript by checking at Announcement Banner (g+g > search for announcement banner)
  • Run the following sql in your database to find which fields holds the JS

     SELECT * FROM fieldlayoutitem WHERE lower(description) LIKE '%javascript%';

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.