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

Build start failed with JsonParseException: Unexpected character

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • github-api-plugin
    • None

      We have problems building any pull requests for one project and i have no idea anymore where to search for the problem.

       

      The build job immediately fail, because the GitHub can't be queried to get the Jenkinsfile in the repository.

      The problem occure at all pull request builds for one project, independent of the changes. All non pull request builds of the same project and builds of all other projects, including pull request builds, works without any problem.

       

      Console output (complete):

      Branch indexing
      11:13:04 Connecting to https://githubatmylocalcompany.de/api/v3 using *********/*****

      GitHub has been notified of this commit's build result

      com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
      at [Source: (StringReader); line: 1, column: 2]
      at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1840)
      at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:712)
      at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:637)
      at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1917)
      at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:773)
      at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4340)
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4189)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3205)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3173)
      at org.kohsuke.github.Requester.parse(Requester.java:629)
      Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: 200, message: 'OK' for URL: https://githubatmylocalcompany.de/api/v3/users/myproject
      at org.kohsuke.github.Requester.parse(Requester.java:646)
      at org.kohsuke.github.Requester.parse(Requester.java:607)
      at org.kohsuke.github.Requester._to(Requester.java:285)
      at org.kohsuke.github.Requester.to(Requester.java:247)
      at org.kohsuke.github.GitHub.getUser(GitHub.java:398)
      at org.jenkinsci.plugins.github_branch_source.GitHubSCMFileSystem$BuilderImpl.build(GitHubSCMFileSystem.java:304)
      at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:293)
      at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:103)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:427)
      Finished: FAILURE

       

      We had a problem with our GitHub server. After we solve the problem this error occure. But i have no idea what exactly cause this error and where to search for a solution.

       

      Manually query the GitHub Api (https://githubatmylocalcompany.de/api/v3 and https://githubatmylocalcompany.de/api/v3/users/myproject) using curl and user / pw works and response with a valid json.

            Unassigned Unassigned
            daniel_schulze Daniel Schulze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: