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

TSF DevOps event returns Bad Request because of convert to URI exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • tfs-plugin
    • None
    • Jenkins 2.243
      Team Foundation Server Plug-in
      5.157.1
      Windows 10

      If trigger from TFS DevOps (PR) is executed the Response is:

      ...

      Status Code: 400
      Reason Phrase: Bad Request
      HTTP Version: 1.1
      Headers:

      _

      { X-Content-Type-Options: nosniff X-Error-Message: Illegal character in opaque part at index 2: D:\JenkinsScriptReferenceRepository\Mirror\lib.jenkins.git Date: Thu, 16 Jul 2020 09:23:53 GMT Server: Jetty(9.4.30.v20200611) Content-Length: 10141 Content-Type: text/plain; charset=utf-8 }

      _

      ...

       

      and the log shows:

      Jul 16, 2020 11:23:55 AM WARNING hudson.plugins.tfs.TeamEventsEndpoint dispatch

      IllegalArgumentException

      java.net.URISyntaxException: Illegal character in opaque part at index 2: D:\JenkinsScriptReferenceRepository\Mirror\lib.jenkins.git

              at java.net.URI$Parser.fail(Unknown Source)

              at java.net.URI$Parser.checkChars(Unknown Source)

              at java.net.URI$Parser.parse(Unknown Source)

              at java.net.URI.<init>(Unknown Source)

      Caused: java.lang.IllegalArgumentException: Illegal character in opaque part at index 2: D:\JenkinsScriptReferenceRepository\Mirror\lib.jenkins.git

              at java.net.URI.create(Unknown Source)

              at hudson.plugins.tfs.util.UriHelper.areSameGitRepo(UriHelper.java:90)

              at hudson.plugins.tfs.model.AbstractHookEvent.pollOrQueueFromEvent(AbstractHookEvent.java:302)

              at hudson.plugins.tfs.model.GitPullRequestMergedEvent.perform(GitPullRequestMergedEvent.java:97)

              at hudson.plugins.tfs.TeamEventsEndpoint.innerDispatch(TeamEventsEndpoint.java:171)

              at hudson.plugins.tfs.TeamEventsEndpoint.dispatch(TeamEventsEndpoint.java:141)

              at hudson.plugins.tfs.TeamEventsEndpoint.doGitPullRequestMerged(TeamEventsEndpoint.java:205)

       

      It looks like there is a configuration in some Jobs (we have lot of them, no idea how to find) with windows path to local repo and Git Plugin work with this configuration. But the compare with convert to URI throws exception and it just aborted instead of checking next Job Git config.

            Unassigned Unassigned
            andre_bossert_siemens Andre Bossert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: