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

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

    • 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.

          [JENKINS-63112] TSF DevOps event returns Bad Request because of convert to URI exception

          Andre Bossert created issue -
          Andre Bossert made changes -
          Description Original: 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\s7p.itest.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.
          New: 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.
          Andre Bossert made changes -
          Description Original: 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.
          New: 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.
          Andre Bossert made changes -
          Priority Original: Minor [ 4 ] New: Blocker [ 1 ]
          Ian Williams made changes -
          Assignee Original: redsolo [ redsolo ]

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

              Created:
              Updated: