jenkins-infra / crawler

tools crawler
26 stars 65 forks source link

groovy.groovy fails #116

Closed lemeurherve closed 2 years ago

lemeurherve commented 2 years ago

While working on https://github.com/jenkins-infra/helpdesk/issues/2950 we noticed the script https://github.com/jenkins-infra/crawler/blob/master/groovy.groovy to retrieve last groovy versions fails with the following error, preventing it to be signed and updated on Update Center.

12:00:44 + export JENKINS_SIGNER=-key /update-center.key -certificate /update-center.cert -root-certificate ****/jenkins-update-center-root-ca.crt 12:00:44 + groovy -Dgrape.config=./grapeConfig.xml ./lib/runner.groovy groovy.groovy 12:02:22 loading dependencies...done 12:02:22 Caught: com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "fetch" is not defined. (https://groovy.jfrog.io/ui/externals/systemjs/dist/s.min.js#1) 12:02:22 ======= EXCEPTION START ======== 12:02:22 EcmaError: lineNumber=[1] column=[0] lineSource=[] name=[ReferenceError] sourceName=[https://groovy.jfrog.io/ui/externals/systemjs/dist/s.min.js] message=[ReferenceError: "fetch" is not defined. (https://groovy.jfrog.io/ui/externals/systemjs/dist/s.min.js#1)] 12:02:22 com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "fetch" is not defined. (https://groovy.jfrog.io/ui/externals/systemjs/dist/s.min.js#1) 12:02:22 at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:883)

Ref: https://github.com/jenkins-infra/helpdesk/issues/2950#issuecomment-1157487382

lemeurherve commented 2 years ago

Notes: installing java & groovy locally to debug it with asdf

asdf plugin-add java https://github.com/halcyon/asdf-java
asdf install java temurin-8.0.332+9
asdf local java temurin-8.0.332+9

asdf plugin-add groovy https://github.com/weibemoura/asdf-groovy.git
asdf list-all groovy
asdf install groovy 3.0.8
asdf local groovy 3.0.8