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

Bitbucket notify on start failed: String index out of range: -10

      Job setup according to the guideline:

      I always get following error messages, on every job i try to build:

      Bitbucket notify on start failed: String index out of range: -10
      Bitbucket notify on finish failed: String index out of range: -10

      Jenkins version:
      1.644

      Git Plugin:
      2.4.0 + 2.4.1 (tested with both)

          [JENKINS-32498] Bitbucket notify on start failed: String index out of range: -10

          Balazs Nemeth added a comment -

          https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/3/files

          be advised, I wrote it in the github web editor so without a compiler

          Balazs Nemeth added a comment - https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/3/files be advised, I wrote it in the github web editor so without a compiler

          Code changed in jenkins
          User: Balázs Németh
          Path:
          src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java
          http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/12c6e53a84763705cdaedf1f4572cdd22bfacacd
          Log:
          JENKINS-32498 logger fix

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Balázs Németh Path: src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/12c6e53a84763705cdaedf1f4572cdd22bfacacd Log: JENKINS-32498 logger fix

          Antonio Mansilla added a comment - - edited

          My apologize for the delay. Last friday was released a new version of the plugin with some improvements in the logging. Now maybe we are capable to identify the problem.

          bnz Can you please try to reproduce the error again and paste here the output of the log?

          Antonio Mansilla added a comment - - edited My apologize for the delay. Last friday was released a new version of the plugin with some improvements in the logging. Now maybe we are capable to identify the problem. bnz Can you please try to reproduce the error again and paste here the output of the log?

          Erik Woitschig added a comment - - edited

          Yes, sure - thank you for your actions already.

          Bitbucket notify on start failed: String index out of range: -10
          java.lang.StringIndexOutOfBoundsException: String index out of range: -10
          	at java.lang.String.substring(String.java:1911)
          	at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.createBuildStatusResourceFromBuild(BitbucketBuildStatusNotifier.java:174)
          	at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.prebuild(BitbucketBuildStatusNotifier.java:77)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:837)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:832)
          	at hudson.model.Build$BuildExecution.doRun(Build.java:144)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
          	at hudson.model.Run.execute(Run.java:1738)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:410)
          
          Bitbucket notify on finish failed: String index out of range: -10
          java.lang.StringIndexOutOfBoundsException: String index out of range: -10
          	at java.lang.String.substring(String.java:1911)
          	at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.createBuildStatusResourceFromBuild(BitbucketBuildStatusNotifier.java:174)
          	at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.perform(BitbucketBuildStatusNotifier.java:101)
          	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
          	at hudson.model.Build$BuildExecution.cleanUp(Build.java:195)
          	at hudson.model.Run.execute(Run.java:1785)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:410)
          

          Please let me know if i can help you further.

          Erik Woitschig added a comment - - edited Yes, sure - thank you for your actions already. Bitbucket notify on start failed: String index out of range: -10 java.lang.StringIndexOutOfBoundsException: String index out of range: -10 at java.lang. String .substring( String .java:1911) at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.createBuildStatusResourceFromBuild(BitbucketBuildStatusNotifier.java:174) at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.prebuild(BitbucketBuildStatusNotifier.java:77) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:837) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:832) at hudson.model.Build$BuildExecution.doRun(Build.java:144) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Bitbucket notify on finish failed: String index out of range: -10 java.lang.StringIndexOutOfBoundsException: String index out of range: -10 at java.lang. String .substring( String .java:1911) at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.createBuildStatusResourceFromBuild(BitbucketBuildStatusNotifier.java:174) at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.perform(BitbucketBuildStatusNotifier.java:101) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.cleanUp(Build.java:195) at hudson.model.Run.execute(Run.java:1785) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Please let me know if i can help you further.

          Code changed in jenkins
          User: Antonio Mansilla
          Path:
          src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java
          http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/6358b8b0f0f1967dcfb0edf52ed67903c7681a80
          Log:
          [Fix JENKINS-32498] Fix problem fetching repo name from URI

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Mansilla Path: src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/6358b8b0f0f1967dcfb0edf52ed67903c7681a80 Log: [Fix JENKINS-32498] Fix problem fetching repo name from URI

          Hi bnz good news, finally I have found and fixed the problem and will be published on next plugin release.

          Antonio Mansilla added a comment - Hi bnz good news, finally I have found and fixed the problem and will be published on next plugin release.

          Thank you flagbit!

          I have tested it, its working! Great!

          Erik Woitschig added a comment - Thank you flagbit ! I have tested it, its working! Great!

          Is is my part to close this issue? (newbee )

          Erik Woitschig added a comment - Is is my part to close this issue? (newbee )

          I'm newbee as well, so I don't know but I've already marked it as "Resolved" as the bug is fixed and I'd wait to close it until the Bugfix is published on the next version of the plugin. Then you or anyone can close it I think.

          Antonio Mansilla added a comment - I'm newbee as well, so I don't know but I've already marked it as "Resolved" as the bug is fixed and I'd wait to close it until the Bugfix is published on the next version of the plugin. Then you or anyone can close it I think.

          So since the bug was fixed and released in the version 1.0.3, I think the issue can be closed.

          Antonio Mansilla added a comment - So since the bug was fixed and released in the version 1.0.3, I think the issue can be closed.

            flagbit Antonio Mansilla
            bnz Erik Woitschig
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: