Jenkins 2.346.1 scriptApproval page is not showing nicely

After upgrade to 2.346.1 of Jenkins I am seeing this issue of in-process script approval page not displaying nicely. Meaning the code should have been in a textarea nicely unlike the screenshot.

When I first land on this page, by navigating to

Manage Jenkins → In-Process script Approval, it shows it correctly. After I click the button Approve then the format is getting messed up.

2 Likes

I’m not able to duplicate the issue that you’re reporting. Can you provide more details?

I have simple pipeline, that looks like this

SEED = [
'utils/seed.groovy',
'utils/a/seed.groovy',
'utils/b/seed.groovy',
'utils/c/seed.groovy',
]

SEED.each { seedPath ->
    parameters = [
        stringParam(name: 'SEED_PATH', value: seedPath),
        stringParam(name: 'GERRIT_REFSPEC', value: 'refs/changes/21/123456/3'),
        stringParam(name: 'GERRIT_PROJECT', value: 'my-cicd'),
        stringParam(name: 'RELEASE_FILE_PATH', value: ''),
        stringParam(name: 'GERRIT_BRANCH', value: 'main'),
        stringParam(name: 'GERRIT_HOST', value: 'gerrit.abc4.ci.mycomp.com'),
    ]

    build(
        job: "CICD/SuperSeed",
        wait: true,
        propagate: false,
        parameters: parameters,
    )
}

This pipeline is calling another job, which take a parameter as input, the path. This will trigger the superseed job. and ask for Approve/Deny in the scriptApproval page, since there are 4 files it will ask for 4 times (Approve or Deny).

Initially when you visit this page (scriptApproval page) everything looks normal and nicely formatted. But, after clicking the FIRST Approve button, the blocks under Approve/Deny buttons gets messed up as showing in my earlier screenshot. But, if you refresh the page everything is back to normal.

However, if you click on second or latter Approve/Deny button’s you won’t see any issues. Only with the First Button it happens.

Hi!
I had the same issue, I’m working with Active Choices DynamicReferenceParameter with sandbox false.
After playing & modifying with my GroovyScript, the Jenkins Script approval page had multiple Groovy scripts to approve (see pic)

But, once I have pressed Deny on the first Groovy Script, the Script approval page become like that

note: I had to seperate my comments here, because I wasn’t able to upload 2 pics in the same comment

this is happening in 2.375.4 version of jenkins still. i haven’t found a workaround for this, if anyone has appreciate your help. if there is a defect filed for this please give the number for it here.

I think you should evaluate your installed plugins to see if one or more of them has a known issue with the configuration form modernization that was implemented in Jenkins 2.277.1. Detailed steps are included in the article at:

the issue with the in-process script approval page not displaying correctly after upgrading to version 2.346.1 of Jenkins is likely due to a bug in the software. To resolve this issue, you can try updating plugins, clearing your browser cache and cookies,