Closed timja closed 10 years ago
I can confirm this issue: There is a javascript error triggered:
Timestamp: 19.08.2013 11:40:43
Error: SyntaxError: invalid regular expression flag j
Source File: http://trac.frm2.tum.de/jenkins/static/5e152190/scripts/hudson-behavior.js
Line: 416, Column: 9
Source Code:
/jenkins/job/FreeBSDUpdatePort/descriptorByName/jenkins.plugins.publi
...
// Behavior rules
//========================================================
// using tag names in CSS selector makes the processing faster
function registerValidator(e) {
e.targetElement = findFollowingTR(e, "validation-error-area").firstChild.nextSibling;
e.targetUrl = function() {
var url = this.getAttribute("checkUrl");
var depends = this.getAttribute("checkDependsOn");
if (depends==null)
{// legacy behaviour where checkUrl is a JavaScript return eval(url); // need access to 'this', so no 'geval' <--- this is line 416 }
else {
var q = qs(this).addThis();
if (depends.length>0)
depends.split(" ").each(function
{ q.nearBy(n); }
);
return url+ q.toString();
}
};
...
Getting same error on upgrade to 1.528
File was modified as part of https://issues.jenkins-ci.org/browse/JENKINS-19124
Code change was part of JENKINS-19124
mine sames to fail when processing
url=/jenkins/job/JOB_NAME/descriptorByName/jenkins.plugins.publish_over_ssh.BapSshTransfer/checkExecCommand
depends=null
Uncaught SyntaxError: Unexpected token ILLEGAL
I have the same Problem and a simple replacement (downgrade) of the jenkis.war (version 1.528) with the version 1.527 works for me, too.
Might be a problem between the JavaScript change and the publish over ssh plugin as reported in JENKINS-19253
The URL causing the JavaScript error for me was a publish over ssh url
I don't have this problem on 1.528, so I guess it depends on what specific plugins are installed.
I don't have publish_over_ssh installed.
Assigning to bap, since this appears to eb an issue with the publish-over-ssh plugin.
Interesting: Our Jenkins has an activated "Publish Over SSH". When I have some time, I check, if Jenkins 1.528 works with deactivated "Publish Over SSH" Plug-in.
Fix made in https://github.com/jenkinsci/jenkins/pull/910
We should probably try/catch whenever we're 'eval'ing Javascript, it's not good to assume it will always be sane.
I have the publish over ssh plug in installed, but it's not part of any of the builds. I'm going to try to remove it and see if that corrects the problem.
I uninstalled the publish over ssh plug in and it resolves the problem (which is a better work around than downgrading Jenkins IMO).
I can confirm that deactivating publish over ssh plugin temporarily resolves the issue (on 1.528 from Debian repo).
Also uninstalled the publish over ssh plug in and it resolves the problem with 1.528
Just to throw it out there, has anyone tried to just disable the publish over ssh plug in? I probably should have but thought about it only after I uninstalled it.
I have the same issue. I have disabled the plugin and it works again. However this plugin is used in several projects here so it would be great to have a fix asap
we have the same problem and we are dependent on the publish-over-ssh plugin.
so we downgraded to 527 for now and hope this weill be fixed fast.
also, with 528 the http publisher plugin did not create proper links anymore, with 527 this is still fine.
Many people googled JENKINS-9494 when this problem was found. My comment relating to this problem and those of ~4 others are there.
I ran into this issue this morning after upgrading to 1.529. Disabling the Publish Over SSH plug-in made the symptoms go away.
Looking at #19323 I think the problem stems from the fact, that javascript allow a shortcut regexp notation if an expression starts with /.
If we catch the SyntaxError raised, and quote the string, it is working correctly again.
hudson-behaviuor.js ~416 if (depends==null) {// legacy behaviour where checkUrl is a JavaScript try{ return eval(url); // need access to 'this', so no 'geval' } catch (x){ return eval("'"+url+"'"); } } else {
The publish-over-ssh-plugin is sending a relative url causing the js-engine to treat it as a regexp.
I'm seeing something similar in 1.529; the message in Chrome's JS console is "Invalid flags supplied to RegExp constructor 'job'". It happens both in a newly created freestyle job and an existing one.
I have the SSH publishing plugin installed, and had updated both Jenkins and the plugin (to v1.10) yesterday. I've tried downgrading the plugin to 1.09 and it didn't help. Disabling or uninstalling it isn't an option, I'll have to downgrade until this is fixed.
@pedersen sounds like the start of a pull request, though ideally we should add some test coverage for this.
Just a note, I think it's really strange that a plug in that I didn't even have in use in any of my jobs caused this issue. One would think that if you didn't have it in use in any job that it would not negatively affect the job (similar to having the plug in disabled globally). Just a thought.
See also https://www.jfrog.com/jira/browse/HAP-325 this is the same from a user perspective.
alen:
Pedersens patch works. I am running 1.529 with Publish over SSH 1.09.
Thank you very much.
I can confirm that Pedersens patch works. I cloned the git repo and applied the patch to master. Not going back to releases until this is fixed.
Jenkins ver. 1.531-SNAPSHOT (private-08/30/2013 05:37 GMT), Publish over SSH 1.10.
Thank you for finding a workaround.
Someone should go through possible duplicates that do not mention Publish Over SSH and check if the attempted fix now in trunk resolves them.
swf:
Same problem here with 1.529 but Publish Over SSH plugin is not installed!? Here's the list of installed plugins:
Jenkins Mailer Plugin 1.5
External Monitor Job Type Plugin 1.2
LDAP Plugin 1.6
PAM Authentication plugin 1.1
Ant Plugin 1.2
Javadoc Plugin 1.1
Green Balls 1.12
Token Macro Plugin 1.8.1
Maven Integration plugin 1.529
Jenkins Subversion Plug-in 1.50
Jenkins CVS Plug-in 2.9
Deploy WebLogic Plugin 2.5
Credentials Plugin 1.7.6
Jenkins Translation Assistance plugin 1.10
Static Analysis Utilities 1.54
FindBugs Plug-in 4.51
SSH Credentials Plugin 1.4
Jenkins SSH Slaves plugin 1.2
PMD Plug-in 3.37
Checkstyle Plug-in 3.38
Static Analysis Collector Plug-in 1.38
Jenkins disk-usage plugin 0.20
Timestamper 1.5.7
Jenkins Email Extension Plugin 2.32
Jenkins M2 Extra Steps Plugin 1.1.7
Jenkins Job Configuration History Plugin 2.4
Jenkins Maven Release Plug-in Plug-in 0.12.0
Console Column Plugin 1.5
Jenkins Sonar Plugin 2.1
Yves Schumann: deactivate em one by one to find the guilty one
For me disabling "Publish Over SSH" helped view configuration page "Jenkins ver. 1.530". But I need this plugin to be enabled.
I am having the same issue with 1.530. Disabling the plugin isn't really a workaround.
Please test the purported fix (of JENKINS-19457) in 1.531.
For me Jenkins didn't suggested new version. As temporal solution I edited hudson-behaviuor.js file and wrapped "return eval(url); " with try/catch. Seems that functionality still works. Waiting for new release
I get the same error on upgrade to 1.528. After wait some releases e this issue don't was correted, i decided to downgrade to 1.527
No longer facing the problen with 1.531. That said, I also updated all plugins (but xunit)
I have installed Jenkins version 1.527, when this issue will be fixed?
Daniel Baldo, do you mean 1.527 or 1.537? Please provide a few more details about your plugin environment.
My version Jenkins is 1.527. See the atached zip file with my environment.
Daniel, what exactly are you asking?? You say that you are on 1.527. DO you have the problem on that release or not?
The problem was fixed in 1.531, as far as I know. Did you read the all the comments in this ticket?
Believed to have been resolved with the fix in JENKINS-19457.
For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues
Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/193
And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-19248%22
(Note: this is an automated bulk comment)
[Duplicates: JENKINS-19457]
[Originally duplicated by: JENKINS-19511]
[Originally duplicated by: JENKINS-19293]
[Originally related to: JENKINS-19389]
When upgrading from 1.527 to 1.528, no jobs can be edited anymore!
When clicking the configure button (or going to jobname/configure), it starts loading the fields and filling in the data from the configuration, but the "LOADING" overlay never disappears, and the job settings can't be changed.
When looking at the web browser console, I see a lot of ajax POST requests from the browser, but the LOADING never disappears.
Downgrading to 1.527 solves the problem.
Are there any more logs I can attach to help solving the problem?
Originally reported by rggjan, imported from: regression: Upgrading to 1.528 ("Upgrade Automatically") breaks "configure"