Script functions do not initialize properly for Script Runner addon

We recently began encountering an issue where the Script Functions do not initialize properly.

error_message.png

As a result, none of our filters that rely on the script functions work. To resolve the issue, we click the "scan" link on Script Functions configuration page and everything begins working again.

The only error we've seen in the logs is:

2014-12-02 09:36:47,979 Thread-41 WARN onresolve.scriptrunner.runner.ScriptRunnerImpl Script bundle://156.0:0/com/onresolve/jira/groovy/jql/plugins/AddedAfterSprintStart.groovy failed to load/compile
2014-12-02 09:36:48,161 Thread-41 WARN onresolve.scriptrunner.runner.ScriptRunnerImpl Script bundle://156.0:0/com/onresolve/jira/groovy/jql/plugins/AddedAfterSprintStartProxy.groovy failed to load/compile

I've restarted JIRA multiple times and it seems as though each time I have to click the "scan" link to get the functions to return.

Has anyone encountered this issue before or have suggestions for resolving/troubleshooting.

 

3 answers

0 vote

I've not seen that. Can I suggest you create an issue at https://jamieechlin.atlassian.net/browse/GRV, and most importantly, attach the atlassian-jira.log from startup. That is, shutdown, remove the log, start up, do your fix, then give me the log.

If you can reproduce on a non-production instance all the better.

Edit: the warnings you see are expected if you don't have JIRA Agile installed.

Hi Jamie,

As it turns out, I created one a while back, but it might have slipped through the cracks.

https://jamieechlin.atlassian.net/browse/GRV-578

Sorry mate, I am going through emails out of order... I'll get to that one ;-)

But would have been good to reference the ticket in the question!

Hi Jamie, We just had the same thing happen in one of our instances, they came back with the scan. I can not view the issue referenced, can you let me know if there was a resolution. Thanks!

Jennifer - what version of the plugin are you using, and is it possible to update to the latest?

We are on 3.0.10. I will upgrade and hopefully that will fix it.

Jamie - do you always have to shut down JIRA and remove previous versions before upgrading? I thought we had done it through the mange add-ons page before with-out shutting down and removing prior versions but I see in the documentation that you should do that when upgrading. Thanks


Hi Jenifer,

For what it's worth, here's the code we've put into a cron job that fires periodically to workaround the issue until it's permanently fixed.

 

#!/bin/bash

# This script logins into a JIRA server and simulates the click of a button
# to populate JQL functions due to a bug in Script Runner.
# https://jamieechlin.atlassian.net/browse/GRV-578

USERNAME=XXXXXX
PASSWORD=XXXXXX
JIRA_URL=http://localhost:8080/jira
COOKIES=/var/lib/jira/scripts/cookies.txt
HEADER="X-Atlassian-Token: no-check"

echo Logging in...
curl -s -c "$COOKIES" -H "$HEADER" -d "os_username=$USERNAME" -d "os_password=$PASSWORD" -d "os_cookie=true" $JIRA_URL/login.jsp --output login.html

echo Authenticating as administrator...
curl -si -c "$COOKIES" -b "$COOKIES" -H "$HEADER" -d "webSudoPassword=$PASSWORD" -d "os_cookie=true" -d "webSudoIsPost=false" -d "authenticate=Confirm" $JIRA_URL/secure/admin/WebSudoAuthenticate.jspa --output auth.html

echo Simulating clicking the scan link
curl -si -c "$COOKIES" -b "$COOKIES" -H "$HEADER" $JIRA_URL/rest/scriptrunner-jira/latest/jqlfunctions/scan --output scan.html

echo Cleaning up...
rm $COOKIES
rm login.html
rm auth.html
rm scan.html

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

365 views 0 6
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