timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-64072] Configure UI completely broken after upgrade to 2.264 #1275

Closed timja closed 2 years ago

timja commented 3 years ago

Report all issues with a complete plugin list, and a screenshot

JENKINS_HOST=username:password@myhost.com:port
curl -sSL "http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | perl -pe 's/.*?([\w-]+).*?([^<]+)()(<\/\w+>)+/\1 \2\n/g'|sed 's/ /:/'
 

Check if your plugin already has an issue reported https://issues.jenkins.io/secure/Dashboard.jspa?selectPageId=20741 artifactory is https://github.com/jfrog/jenkins-artifactory-plugin/issues/350

If you know which plugin is causing the issue report a new issue, including steps to reproduce and screenshots and label it with 'tables-to-divs-regression'

How to identify which plugin is causing the issue

1. check plugins list against open issues on https://issues.jenkins.io/secure/Dashboard.jspa?selectPageId=20741
2. then if no open issue matches:

How to triage someone else's issue

1. check plugins list against open issues on https://issues.jenkins.io/secure/Dashboard.jspa?selectPageId=20741
2. then if no open issue matches:

curl https://issues.jenkins.io/secure/attachment/53350/53350_jenkins-basith-16112020.txt | sort > abdul-bas-plugins.txt
cat abdul-bas-plugins.txt | cut -d ':' -f 1 | sort > plugins.filtered.txt # remove versions as CLI complains when old versions are there
wget https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.1.2/jenkins-plugin-manager-2.1.2.jar
wget https://get.jenkins.io/war/2.266/jenkins.war
export JENKINS_HOME=~/.jenkins-64072
java -jar jenkins-plugin-manager-2.1.2.jar -f abdul-bas-plugins.txt -d ~/.jenkins-64072/plugins --war jenkins.war
java -jar jenkins.war

original text

After upgrade to 2.264.1 via yum package, the confgure UI of all my projects was borked, showing things that the project didn't support, preventing modification and updates to jobs.  Jobs were still running correctly however.  Looking at JavaScript console there were alot of errors in js files.  console log attached.  

 

Fixed by downgrading to 2.263.1 via yum downgrade and temporarily locking the version.  While the UI appears better in 2.263.1, some boxes are still long and an error is still received in the console:

 

hudson-behavior.js:2982 Uncaught SyntaxError: Unexpected token ')'
 at onSuccess (combobox.js:19)
 at klass.respondToReadyState (prototype.js:1657)
 at klass.onStateChange (prototype.js:1600)
 at XMLHttpRequest. (prototype.js:414)

 


Originally reported by jonl_percsol, imported from: Configure UI completely broken after upgrade to 2.264
  • status: Closed
  • priority: Blocker
  • resolution: Fixed
  • resolved: 2022-06-12T14:10:49+00:00
  • imported: 2022/01/10
timja commented 3 years ago

timja:

jonl_percsol do you have the http_request plugin installed?  https://issues.jenkins-ci.org/browse/JENKINS-64054

 

If not can you provide a full list of plugins and their versions please:

(source of script https://github.com/jenkinsci/docker#plugin-installation-manager-cli-preview-2)

JENKINS_HOST=username:password@myhost.com:port
curl -sSL "http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | perl -pe 's/.*?([\w-]+).*?([^<]+)()(<\/\w+>)+/\1 \2\n/g'|sed 's/ /:/'
 
timja commented 3 years ago

jonl_percsol:

plugin xml attached list attatched.  http_request not directly installed.

timja commented 3 years ago

aptalca:

I'm experiencing the same issue, can't edit any jobs due to the messed up formatting, save button doesn't work.

 

I do have the http_request plugin installed. I installed the pre-release plugin version 1.8.27 from the linked issue above, but it didn't seem to have any effect on the formatting.

timja commented 3 years ago

laksh:

Yes i am experiencing the same issue 

Jenkins version: 2.264
Java Runtime : Open Jdk 1.8.0_272 from https://adoptopenjdk.net/

Configuration screen is broken and Save and Apply button are not visible

In chrome, dev tools -> console -> I see lot of these errors.

> hudson-behavior.js:49 TypeError: e.getAttribute is not a function
> at findFormParent (hudson-behavior.js:2589)
> at findNearBy (hudson-behavior.js:275)
> at Object.nearBy (hudson-behavior.js:327)
> at hudson-behavior.js:526
> at hudson-behavior.js:47
> at prototype.js:853
> at Array.forEach ()
> at Array.each (prototype.js:852)
> at HTMLInputElement.e.targetUrl (hudson-behavior.js:525)
> at registerValidator (hudson-behavior.js:533)

 I do not have http-request plugin installed.

See attached plugin-list laksh - jenkins plugins.txt

timja commented 3 years ago

timja:

aptalca that will mean you have another plugin installed causing issues, can you provide a full list please

 

laksh I've reviewed the list and haven't seen any with known issues, I'll find which one is causing it later on

 

jonl_percsol can you try disabling the artifactory plugin? ref https://github.com/jfrog/jenkins-artifactory-plugin/issues/350  , I've tried with your plugins and more needs disabling, I'll get back to you

 

timja commented 3 years ago

timja:

laksh is that the full list of plugins? I installed all the plugins on there with their latest versions and I was unable to reproduce.

 

laksh did you mean job configuration or system configuration?

 

cat /tmp/plugins.txt | cut -d ' ' -f 1 > /tmp/plugins2.txt
rm -rf ~/.jenkins-tables
export JENKINS_HOME=~/.jenkins-tables
java -jar ~/Downloads/jenkins.war
java -jar ~/Downloads/jenkins-plugin-manager-2.1.0.jar -d ~/.jenkins-tables/plugins/ --war ~/Downloads/jenkins.war -f /tmp/plugins2.txt
timja commented 3 years ago

lingwocj:

I am having the same issue. I've attached a plugins list plugins.txt

We did have http_request which was breaking "Configure System" too but I uninstalled that (along with a lot of other stuff we aren't using). Configure system now works.

I am getting very similar errors from behaviour.js and nothing relavent looking server side. The issue seemed to be triggered on html tags related to bitbucketscm. I am currently running 2.9.2 of Bitbucket Branch Source but 2.9.4 had the same issues and their tracker doesn't have anything yet.

Ideally if the gui gets this broken it should fail to save, we had a situation where all our project behaviours for the master Bitbucket project were lost (so no builds for anyone). Downgrading to 2.263 has resolved this for now.

timja commented 3 years ago

aptalca:

timja here's a list of all plugins: 

https://pastebin.com/sfPzxBK7

timja commented 3 years ago

laksh:

timja on both System Configuration and Job Configuration layout is broken. On job configuration Save & Apply are visible but does not do anything when clicked. And on System configuration these two buttons are not visible.

timja commented 3 years ago

timja:

laksh can you make sure you update all your plugins please? when I installed your plugins system config was fine, (at least without configuring anything)

timja commented 3 years ago

timja:

lakshjonl_percsol and aptalca

publish over SSH plugin is causing this, which you all have installed, I created https://issues.jenkins-ci.org/browse/JENKINS-64078

 

jonl_percsol you also have artifactory installed which is https://github.com/jfrog/jenkins-artifactory-plugin/issues/350 

 

timja commented 3 years ago

jonl_percsol:

timja,

 

Thanks for the investigation.  Unfortunately, those two plugins are used by multiple projects and not an easy removal on our end, especially the artifactory one.  I will watch those bugs for updates.

timja commented 3 years ago

aptalca:

timja I uninstalled publish over ssh, restarted, but still the same issue with the messed up formatting on /configure

timja commented 3 years ago

timja:

Anyone using publish over SSH please update to latest, https://issues.jenkins-ci.org/browse/JENKINS-64078 is fixed and released

timja commented 3 years ago

timja:

lingwocj I wasn't able to reproduce your issue, would you be able to create a new issue and tag me in.

 

I need screenshots and your existing config (along with the plugin list copied there)

timja commented 3 years ago

aptalca:

timja

I tried uninstalling the publish over ssh plugin, didn't have any effect.

Then I installed the new patched version, again, no effect.

Here's a new plugin list: https://pastebin.com/FPJQFWHc

Attached are a couple of pics showing the incorrect formatting on a new freestyle project configure page

timja commented 3 years ago

timja:

aptalca yes I know, looking at your plugins currently

timja commented 3 years ago

timja:

aptalca your issue is https://plugins.jenkins.io/urltrigger/  https://issues.jenkins-ci.org/browse/JENKINS-64081

 

I've re-tested after enabling everything again,

disabling http_request and urltrigger fixes the issue for me using your plugins

timja commented 3 years ago

timja:

I think I've triaged all issues, except for Chris's issue which I can't reproduce.

Please let me know if this isn't the case.

timja commented 3 years ago

aptalca:

timja thanks so much for identifying and confirming. Unfortunately we have a lot of jobs that rely on the urltrigger plugin so we'll have to wait until it's fixed.

timja commented 3 years ago

timja:

I should have a fix for urltrigger tomorrow morning UTC time, it looks straightforward. 

timja commented 3 years ago

lingwocj:

timja It is slightly different perhaps to these other issues, I'd probably have reported it to Bitbucket Branch Source Plugin if I'd not found this. The problem exists in their latest version and the previous, but only in Jenkins 2.264. Everything works fine in 2.263.

If I create a new Bitbucket Team/Project it wont save the "Repository Source" and it comes up blank on editing. If I then create the source again and add a behaviour, the source isn't there after a save. If I don't add the behaviour then the source will save despite the js error.

This js error appears after creating the new repository source during an edit. I saw no js errors when creating a new project.

I can report this in their git repo if you would prefer.

timja commented 3 years ago

timja:

There’s a separate branch api ticket which is likely the cause of that one

timja commented 3 years ago

javadevil:

We are having this issue on the configure Project page, similar to the images aptalca posted above.
List of plugins here Plugins.txt

 Browser console presents several of these JS errors related to several different properties

behavior.js:119 TypeError: Cannot read property 'hasClassName' of undefined
    at repeatable.js:159
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
    at window.onload (behavior.js:133)
timja commented 3 years ago

iceinvein:

List of plugins: plugins.txt

Console error when loading pipeline project

behavior.js:119 TypeError: Cannot read property 'hasClassName' of undefined
    at VM3783 repeatable.js:159
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
    at window.onload (behavior.js:133)
behavior.js:119 TypeError: Cannot read property 'next' of undefined
    at findEnd (hudson-behavior.js:808)
    at hudson-behavior.js:1109
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
behavior.js:119 TypeError: Cannot read property 'hasClassName' of undefined
    at hudson-behavior.js:1146
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
    at window.onload (behavior.js:133)
behavior.js:119 TypeError: Cannot read property 'makeInnerVisible' of undefined
    at updateOptionalBlock (hudson-behavior.js:1528)
    at hudson-behavior.js:1167
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
behavior.js:119 TypeError: Cannot read property 'makeInnerVisible' of undefined
    at updateDropDownList (hudson-behavior.js:1236)
    at hudson-behavior.js:1250
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71
timja commented 3 years ago

seineriver:

Having the same problem here. I don't have any of the above mentioned plugins. plugin.txt

timja commented 3 years ago

javadevil:

For us it was the fstrigger plugin which was causing this - removing it resolved the issue.

timja commented 3 years ago

iceinvein:

javadevil Thanks! fstrigger was the issue for me too

timja commented 3 years ago

timja:

seineriver you have the artifactory plugin installed https://github.com/jfrog/jenkins-artifactory-plugin/issues/350

Dik and Chris thanks, I'm looking at that plugin currently, seems it hasn't been touched in a very long time...

timja commented 3 years ago

timja:

I've created JENKINS-64139 for fstrigger, it's got quite a low install base, and it needs some work to be updated for testing it properly.

Let us know on the issue if you need it fixed otherwise I'm going to look at more important plugins first

timja commented 3 years ago

avdelst:

FYI,

I don't have the fstrigger or artifcatory plugin installed and also have the same issue when upgrading to 2.265

How can you tell which plugin is causing this issue ? Enable/disable them one by one ?

timja commented 3 years ago

timja:

I normally do it in groups of 10 or so but yes disable until you figure it out

timja commented 3 years ago

vwbusguy:

I've disabled dozens of plugins and I haven't been able to narrow it down yet.  It doesn't seem obvious what plugins are causing it from the browser console logs, either.  It looks like it's specific to the web UI though, so for now I'm hacking the job XML and reloading from disk as a workaround, which isn't fun, but at least it will keep jobs running for now.

timja commented 3 years ago

javadevil:

I'll share how I found my problem plugin in case this also helps other narrow it down.

By looking at the config screen and seeing which was the last plugin to be correctly be rendered in the center div (green arrow), red arrow incorrect and where the problems started.
(NB: Reusing someone else screenshot here as I don't have the problem to take my own)
Then I looked at the help of those to see which plugin it was (orange box), checked the github repo and inspected the config.jelly files to see if they used table tags.

timja commented 3 years ago

timja:

vwbusguy

can you post a plugin list please:
https://issues.jenkins-ci.org/browse/JENKINS-64072?focusedCommentId=400146&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-400146

timja commented 3 years ago

aptalca:

timja I hope you don't mind the ping, but with the two plugins (urltrigger and hhtp request) updated, all of our issues are solved.

I also wanted to thank you for your efforts. Not only you identified all of our issues, but you submitted PRs to some of those plugins to fix the issues upstream. You're the real MVP.

timja commented 3 years ago

jbb1:

timja  Thanks for all your work getting this straightened out!

I haven't been able to track down the cause for our install.  Here is a list of our enabled plugins at the moment:  https://gist.github.com/LaCuneta/206aa658103a1059f8e91c1bae8d055f

I did a bunch of disabling of plugins we don't use and got some of our basic jobs editable again, but our multi-branch pipeline jobs still error out.  Maybe that plugin itself is affected?

Like Scott Williams I've managed to get around it by hand-editing config files for now.

Here is the error that we see in the web console:

behavior.js:119 TypeError: Cannot read property 'firstElementChild' of undefined
    at findNeighboringDynamicInput (VM103 github-scm-source.js:25)
    at VM103 github-scm-source.js:30
    at Array.forEach ()
    at behavior.js:116
    at Array.forEach ()
    at behavior.js:111
    at Array.forEach ()
    at Object.applySubtree (behavior.js:93)
    at Object.apply (behavior.js:76)
    at behavior.js:71

 

timja commented 3 years ago

timja:

Editing pipeline jobs is being worked in the branch api ticket. And yeah aware of that issue too

timja commented 3 years ago

smasher:

Thanks javadevil for giving those instructions. I've managed to find out the responsible files for UI-issues on my installation:

https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/ArtifactoryRedeployPublisher/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/generic/ArtifactoryGenericConfigurator/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/gradle/ArtifactoryGradleConfigurator/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/ivy/ArtifactoryIvyFreeStyleConfigurator/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/ivy/ArtifactoryIvyConfigurator/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/maven3/ArtifactoryMaven3Configurator/config.jelly
https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-3.9.0/src/main/resources/org/jfrog/hudson/maven3/ArtifactoryMaven3Configurator/config.jelly

timja commented 3 years ago

timja:

jbb1 if you build https://github.com/jenkinsci/branch-api-plugin/pull/228 from source I think it should fix your issue. (mvn clean package -P quick-build) (java 8 or 11), result will be in the target directory as a .hpi file.

Worth testing.

CI can't build it to generate an rc build unfortunately because it needs a change in the CI file.

timja commented 3 years ago

borisivan:

Regarding these vertical dashed lines, why are they there, and can they be removed? Every configuration screen is visually poor now, bad user experience.

timja commented 3 years ago

timja:

Can you create a separate issue for that borisivan include screenshots on where it doesn’t looks good please

timja commented 3 years ago

timja:

All major plugins with issues except the artifactory plugin are now fixed, please upgrade to latest plugins and Jenkins 2.266

timja commented 3 years ago

basith:

timja : Upgraded all plugins & jenkins build to Jenkins 2.266. Still the problem persists. Attached the list of plugins. Could you please let me know if any of the plugin is causing the problem and what we need to do.jenkins-basith-11112020.txt

timja commented 3 years ago

timja:

basith you are using the artifactory plugin, please disable and see if it's still an issue

timja commented 3 years ago

JIRAUSER130055:

timja I am still seeing this issue on Jenkins 2.266 with the latest version of all plugins.

Attaching my plugin list: plugins.rossc.txt

Here's a screenshot of how the config page breaks - others mentioned this may be useful:

timja commented 3 years ago

timja:

Can you use the script from the first comment please? I can then create an environment to reproduce it

I had a quick look and can’t see one with a known issue

timja commented 3 years ago

JIRAUSER130055:

timja my apologies, I did not see that due to the number of comments, here it is: plugins.rossc-2.txt

timja commented 3 years ago

timja:

Thanks I’ll look tomorrow

timja commented 3 years ago

borisivan:

Hi timja, I can add additional screenshots, but all the ones here in the comments already illustrate the issue. The presence of the vertical dashed lines to logically group things that are already grouped via indentation is ugly and distracting. Can they be removed, or at least off by default? Maybe if some people need them, they could enable with a non default option in "configure system" or something like that.