I was able to reproduce the error following the tutorial. Thanks for the hint about the jQuery vs. Q, that helped.
The first thing I did was to add a debugger statement in the parameter code, to stop the execution and see what was going on. I added it here:
Doing that, saving the configuraiton, and reloading the page, I could see the parameters being correctly rendered.
After thinking for a while, and looking at the JS console output, I suspected it could be the same bug I saw before: JENKINS-71909
To confirm it, I changed the Groovy script again, now to produce JavaScript that would add the items only a few seconds later.
With that, the tutorial example was rendered correctly (2500 worked for me, but for others it could work with more or less time).
The problem in the linked issue is that some time ago the plug-in got updated to use newer JS code, but also to use Promises asynchronously instead of rendered one parameter at a time, one after the other.
While doing the Promise way gives in theory better rendering performance, looks like we didn't account for some cases of the plug-in, and how it manipulates the DOM, updates values, and re-renders elements.
I am afraid your case will require some further investigation in that issue. So feel free to subscribe to that one. I will mark this as blocked by that, and later once that's fixed will check if this can be closed as duplicated, or if the problem persists. Sorry.
Bruno
Had to search the web for that.
https://stackoverflow.com/a/34372607
> We were using this content HTML in a Jenkins userContent directory. We recently upgraded to the latest Jenkins 1.625 LTS version & it seems they've introduced new Content security policy which adds the below header to the response headers & the browsers simply decline to execute anything like stylesheets / Javascripts.
Maybe you are using a newer version of Jenkins? If so, loading external JavaScript files is blocked by Jenkins. There might be some setting to turn that off, and that probably comes with a big warning or something to make sure you will take responsibility for doing so.
You can reach out to others in their forums (I think Jenkins now has a discourse or some other discussion panel?) and ask about it. I stopped following the development of Jenkins some years ago after I started working more with Python in HPC (behind firewalls, limited Internet) and GitLab and GitHub pipelines/actions.