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

Failure can be reported even when upload succeeded

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I got this report and the stacktrace below:

      "Some times when uploading apk’s (has happened 2 times now) the plugins thinks that upload failed.
      It then says that "No changes were applied to the Google Play account» but when checking in Google Play console, all apk’s were uploaded and published!"

      Essentially the Google Play Publishing API fails to respond in time, so we assume failure.

      Unfortunately from my testing, I've seen this a few times — timeouts or HTTP 500 server errors — even although the changes may have been applied. The API is not the most reliable.

      So we should handle this particular situation (i.e. a timeout while committing the edits) and inform the user that the build outcome is unknown.

      Assigning uploaded APK(s) to alpha release track...
      The alpha release track will now contain the APK(s): 10040, 20045, 30043, 40044, 50041, 60042
      Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.PublisherApiException: java.net.SocketTimeoutException: Read timed out
      	at org.jenkinsci.plugins.googleplayandroidpublisher.AbstractPublisherTask.call(AbstractPublisherTask.java:34)
      	at hudson.FilePath.act(FilePath.java:1006)
      	at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:302)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          ...
      Caused by: java.net.SocketTimeoutException: Read timed out
      	at java.net.SocketInputStream.socketRead0(Native Method)
      	at java.net.SocketInputStream.read(SocketInputStream.java:152)
          ...
      	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
      	at org.jenkinsci.plugins.googleplayandroidpublisher.ApkUploadTask.execute(ApkUploadTask.java:190)
      	at org.jenkinsci.plugins.googleplayandroidpublisher.ApkUploadTask.execute(ApkUploadTask.java:41)
      	at org.jenkinsci.plugins.googleplayandroidpublisher.AbstractPublisherTask.call(AbstractPublisherTask.java:31)
      	... 11 more
      
      - No changes were applied to the Google Play account
      Build step 'Upload Android APK to Google Play' marked build as failure
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/AbstractPublisherTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/4b1afa3741d5885c8acc54eac70ea4f423300e89
          Log:
          [FIXED JENKINS-25398] Don't mark build as failed if it was possibly successful.

          A socket timeout can occur often when committing changes to the Google Play
          publisher API but, despite this, the changes were committed successfully.

          Now we attempt to detect this situation and double-check on Google Play whether
          the changes we attempted to make have been successfully applied on the backend.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/AbstractPublisherTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java http://jenkins-ci.org/commit/google-play-android-publisher-plugin/4b1afa3741d5885c8acc54eac70ea4f423300e89 Log: [FIXED JENKINS-25398] Don't mark build as failed if it was possibly successful. A socket timeout can occur often when committing changes to the Google Play publisher API but, despite this, the changes were committed successfully. Now we attempt to detect this situation and double-check on Google Play whether the changes we attempted to make have been successfully applied on the backend.
          Hide
          orrc Christopher Orr added a comment -

          Version 1.2 of the plugin has been released, which fixes this issue.

          Show
          orrc Christopher Orr added a comment - Version 1.2 of the plugin has been released, which fixes this issue.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              orrc Christopher Orr
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: