Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24031

GitHub remote script catalog tab not populated

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • scriptler-plugin
    • None

      For me (running Jenkins 1.574 with Scripler 2.7) the "GitHub" tab in the "Remote Script catalogs" is not populated although the repo at [1] indeed seems to have some scripts, and populating the "ScriplerWeb" tabs works fine (so it does not seem to be a network issue).

      [1] https://github.com/jenkinsci/jenkins-scripts

          [JENKINS-24031] GitHub remote script catalog tab not populated

          You mean the file is downloaded by the client#s browser that is browsing the Jenkins' web interface? Well, yes, I can download the file also form the client's browser.

          Sebastian Schuberth added a comment - You mean the file is downloaded by the client#s browser that is browsing the Jenkins' web interface? Well, yes, I can download the file also form the client's browser.

          yes...

          in the HOME of jenkins you should see this file: "updates/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog" is it there?
          whats its content?

          If the file is there, please delete it and start jenkins again. When you now access http://localhost:8080/scriptler/catalog, then the new version of the same file will be downloaded via your browser, you should be able to see this in the network view of e.g. firebug or any other browser developer tools.

          Dominik Bartholdi added a comment - yes... in the HOME of jenkins you should see this file: "updates/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog" is it there? whats its content? If the file is there, please delete it and start jenkins again. When you now access http://localhost:8080/scriptler/catalog , then the new version of the same file will be downloaded via your browser, you should be able to see this in the network view of e.g. firebug or any other browser developer tools.

          Sebastian Schuberth added a comment - - edited

          The file is not there. The only contents of the "updates" directory are:

          $ ls updates/
          default.json                               hudson.tasks.Ant.AntInstaller      hudson.tools.JDKInstaller
          hudson.plugins.sonar.SonarRunnerInstaller  hudson.tasks.Maven.MavenInstaller
          

          Sebastian Schuberth added a comment - - edited The file is not there. The only contents of the "updates" directory are: $ ls updates/ default .json hudson.tasks.Ant.AntInstaller hudson.tools.JDKInstaller hudson.plugins.sonar.SonarRunnerInstaller hudson.tasks.Maven.MavenInstaller

          you can delete the content of the `updates` directory. Now start jenkins again, then access jenkins via browser and inspect the requests send via your browser - you should see the requests as in the screenshots I just attached to this issue.

          Please let me know if you see them or not.

          Please note: these files will be updated from time to time, but this can only be enforced if you delete the files from the directory.

          Dominik Bartholdi added a comment - you can delete the content of the `updates` directory. Now start jenkins again, then access jenkins via browser and inspect the requests send via your browser - you should see the requests as in the screenshots I just attached to this issue. Please let me know if you see them or not. Please note: these files will be updated from time to time, but this can only be enforced if you delete the files from the directory.

          I stopped the Jenkins service, deleted all files form the "updates" directory, and restarted the service. Although I didn't see any Scriptler files being downloaded, the "updates" directory now contains the "org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog" file, and the "GitHub" tab is populated.

          It's a bit strange that I didn't see the file being downloaded, neither in Chrome or Firefox. In Chrome, which seems to be what you are using, the "Other" filter on the "Network" tab for me only shows an empty view.

          Sebastian Schuberth added a comment - I stopped the Jenkins service, deleted all files form the "updates" directory, and restarted the service. Although I didn't see any Scriptler files being downloaded, the "updates" directory now contains the "org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog" file, and the "GitHub" tab is populated. It's a bit strange that I didn't see the file being downloaded, neither in Chrome or Firefox. In Chrome, which seems to be what you are using, the "Other" filter on the "Network" tab for me only shows an empty view.

          strange... ...the "Doc" filter should also show it...

          anyway - does mean that the GH catalog is now showing up for you?

          Dominik Bartholdi added a comment - strange... ...the "Doc" filter should also show it... anyway - does mean that the GH catalog is now showing up for you?

          It is, that's what I meant with

          the "GitHub" tab is populated

          above. But isn't there a way for Scriptler to download the file (again) if it's missing?

          Sebastian Schuberth added a comment - It is, that's what I meant with the "GitHub" tab is populated above. But isn't there a way for Scriptler to download the file (again) if it's missing?

          This is whats usually is done in background (I can't recall the interval) - but I currently don't know why this was not working for you

          Dominik Bartholdi added a comment - This is whats usually is done in background (I can't recall the interval) - but I currently don't know why this was not working for you

          I had the exact same problem. Stop jenkins, clear updates folder, start Jenkins fixed the problem for me too.
          One note that might help analysing this problem. I did install the Scriptler plugin without reboot.. Maybe the plugin just needs a Jenkins restart to pick up the repo syncing?

          Frits van der Holst added a comment - I had the exact same problem. Stop jenkins, clear updates folder, start Jenkins fixed the problem for me too. One note that might help analysing this problem. I did install the Scriptler plugin without reboot.. Maybe the plugin just needs a Jenkins restart to pick up the repo syncing?

          Error log says:

           

          May 03, 2020 9:42:35 PM WARNING net.sf.json.JSONObject morphPropertyValue
          Can't transform property 'parameters' from java.lang.String into java.util.List. Will register a default Morpher

          the issue is related to METADATA information in this plugin:
          https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/listEC2Instances.groovy

          "parameters" : "",

          should be and array

          "parameters" : [],

          Fix:
          Open the file "\updates\org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json"
          and replace the quotes ("") by the brackets ([])

          save the file, now the Remote Script catalogs should populate.

          Jonatas de Mello added a comment - Error log says:   May 03, 2020 9:42:35 PM WARNING net.sf.json.JSONObject morphPropertyValue Can 't transform property ' parameters' from java.lang. String into java.util.List. Will register a default Morpher the issue is related to METADATA information in this plugin: https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/listEC2Instances.groovy "parameters" : "", should be and array "parameters" : [], Fix: Open the file "\updates\org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json" and replace the quotes ("") by the brackets ([]) save the file, now the Remote Script catalogs should populate.

            domi Dominik Bartholdi
            sschuberth Sebastian Schuberth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: