UI tests fail with strange exception (ATH)

9 views
Skip to first unread message

Ullrich Hafner

unread,
Mar 12, 2020, 4:11:50 PM3/12/20
to Jenkins Developers
I have a strange failure in one of my ATH test cases:

java.lang.IllegalStateException: maybe need to rebuild plugin?
 at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.get(ScriptApproval.java:118)
 at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApprovalLink.getUrlName(ScriptApprovalLink.java:45)
 at jenkins.model.Jenkins.getDynamic(Jenkins.java:3772)
 at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
 at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
 at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
 at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
 at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:454)
 at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
Caused: javax.servlet.ServletException

Does anyone have an idea what I can do here? Or what plugin I need to rebuild?



Jesse Glick

unread,
Mar 13, 2020, 10:52:25 AM3/13/20
to Jenkins Dev
On Thu, Mar 12, 2020 at 4:11 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
> Or what plugin I need to rebuild?

https://github.com/jenkinsci/script-security-plugin/blob/2eea1479927d091088b214c651b5c9d9ffa5603d/src/main/java/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval.java#L116-L118

but from your log I think the issue is that you are making web
requests after the `script-security` plugin has been loaded but not
fully initialized. Wait for plugin installation to complete.

Ullrich Hafner

unread,
Mar 13, 2020, 11:11:20 AM3/13/20
to Jenkins Developers
I see: the exception occurs before I see h.m.UpdateCenter$CompleteBatchJob#run: in the console:

master63023|2020-03-11 23:54:08.038+0000 [id=75] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of warnings-ng on behalf of anonymous
master63023|2020-03-11 23:54:08.039+0000 [id=75] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading warnings-ng
master63023|2020-03-11 23:54:08.954+0000 [id=75] INFO h.model.UpdateCenter$DownloadJob#run: Installation successful: warnings-ng
master63023|2020-03-11 23:54:08.954+0000 [id=75] INFO h.m.UpdateCenter$CompleteBatchJob#run: Completing installing of plugin batch…
master63023|2020-03-11 23:54:13.624+0000 [id=10] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving 
http://127.0.0.1:63023/newJob

master63023|java.lang.IllegalStateException: maybe need to rebuild plugin?
master63023| at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.get(ScriptApproval.java:118)
master63023| at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApprovalLink.getUrlName(ScriptApprovalLink.java:45)

master63023|2020-03-11 23:54:13.683+0000 [id=78] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
master63023|2020-03-11 23:54:13.748+0000 [id=85] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
master63023|2020-03-11 23:54:13.748+0000 [id=85] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
master63023|2020-03-11 23:54:13.785+0000 [id=81] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
master63023|2020-03-11 23:54:13.799+0000 [id=81] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
master63023|2020-03-11 23:54:13.800+0000 [id=84] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
master63023|2020-03-11 23:54:13.816+0000 [id=79] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
master63023|2020-03-11 23:54:14.075+0000 [id=75] INFO h.m.UpdateCenter$CompleteBatchJob#run: Completed installation of 27 plugins in 9.6 sec

Since I am doing nothing special in my test case, is this is a bug in ATH? Or is there something I should do here on my own? I would expect that my tests should only start if everything is correctly initialized...

My test breaks in the first line:
@Test
public void shouldAggregateToolsIntoSingleResult() {
FreeStyleJob job = createFreeStyleJob("build_status_test/build_01");


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0bjaRS2YF%2BZ%2Bz8G40vthcbk_JFUapGhKp0wq2A8MCF%2Bg%40mail.gmail.com.

Jesse Glick

unread,
Mar 13, 2020, 11:58:56 AM3/13/20
to Jenkins Dev
On Fri, Mar 13, 2020 at 11:11 AM Ullrich Hafner
<ullrich...@gmail.com> wrote:
> Since I am doing nothing special in my test case, is this is a bug in ATH?

Sounds that way.
Reply all
Reply to author
Forward
0 new messages