-
Bug
-
Resolution: Unresolved
-
Critical
-
Powered by SuggestiMate
I have configured post build action to upload .dmg to appcenter and i am getting the following error. I am using the latest plugin with the changes made for build version for windows upload. It works fine for windows, apk and ipa.
ERROR: Build step failed with exception
io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 400 Bad Request: {"error":"Error: Missing required params from body: build_version, version, Service id: "}
[JENKINS-63075] Upload to AppCenter DMG upload failing
Hi Mez Pahlan
Please find below the full stack trace.
ERROR: Build step failed with exception io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 400 Bad Request: {"error":"Error: Missing required params from body: build_version, Service id: ddde6496-c46e-4016-8280-70f186270925"} at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:23) at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:37) at io.jenkins.plugins.appcenter.task.internal.UploadAppToResourceTask.lambda$uploadApp$0(UploadAppToResourceTask.java:71) Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.0.11/10.0.0.11:57031 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel.call(Channel.java:998) at hudson.FilePath.act(FilePath.java:1159) at io.jenkins.plugins.appcenter.AppCenterRecorder.uploadToAppCenter(AppCenterRecorder.java:193) at io.jenkins.plugins.appcenter.AppCenterRecorder.perform(AppCenterRecorder.java:180) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:112) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:156) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:107) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:134) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1880) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused: java.util.concurrent.CompletionException at java.util.concurrent.CompletableFuture.encodeRelay(Unknown Source) at java.util.concurrent.CompletableFuture.completeRelay(Unknown Source) at java.util.concurrent.CompletableFuture.uniRelay(Unknown Source) at java.util.concurrent.CompletableFuture$UniRelay.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source) at io.jenkins.plugins.appcenter.task.internal.UploadAppToResourceTask.lambda$uploadApp$0(UploadAppToResourceTask.java:72) at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source) at retrofit2.CompletableFutureCallAdapterFactory$BodyCallAdapter$2.onResponse(CompletableFutureCallAdapterFactory.java:81) at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Sorry to have to ask you this srilakshmi but can you post the full build log for this please. I can't see anything obviously wrong but maybe the build log has more information.
Obviously redact anything sensitive / personal before you paste it here. I'm interested in mostly the output that this plugin outputs in particular the statements that describe whether it has found a file to upload on the file system.
Hi
I hope the below log helps.
c:\Jenkins_s3\workspace\AppCenter_Upload_Project_Standalone>exit 0
File found matching pattern:
Creating an upload resource for app.
Create upload resource for app successful.
Uploading app to resource.
ERROR: Build step failed with exception
io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 400 Bad Request: {"error":"Error: Missing required params from body: build_version, version, Service id: 8bb52ec6-7418-487a-a198-15e2131c0b33"}
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:23)
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:37)
at io.jenkins.plugins.appcenter.task.internal.UploadAppToResourceTask.lambda$uploadApp$0(UploadAppToResourceTask.java:71)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:998)
at hudson.FilePath.act(FilePath.java:1159)
at io.jenkins.plugins.appcenter.AppCenterRecorder.uploadToAppCenter(AppCenterRecorder.java:193)
at io.jenkins.plugins.appcenter.AppCenterRecorder.perform(AppCenterRecorder.java:180)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:112)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:156)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:107)
at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:134)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1880)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Caused: java.util.concurrent.CompletionException
at java.util.concurrent.CompletableFuture.encodeRelay(Unknown Source)
at java.util.concurrent.CompletableFuture.completeRelay(Unknown Source)
at java.util.concurrent.CompletableFuture.uniRelay(Unknown Source)
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at io.jenkins.plugins.appcenter.task.internal.UploadAppToResourceTask.lambda$uploadApp$0(UploadAppToResourceTask.java:72)
at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at retrofit2.CompletableFutureCallAdapterFactory$BodyCallAdapter$2.onResponse(CompletableFutureCallAdapterFactory.java:81)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Build step 'Conditional steps (multiple)' marked build as failure
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] done
Finished: FAILURE
Thanks srilakshmi. Hmmm...... sorry to say, I'm still a bit unsure on this .
The line that starts File found matching pattern: did you redact something there? No need to tell me what the exact file name is if it is sensitive. But I'm expecting that to output the path to the file to be uploaded rather than nothing. For example in my builds it outputs this:
File found matching pattern: app/build/outputs/apk/qa/debug/*.apk
That's where I thought about starting to investigate on your issue but then the error message below that is confusing me:
{"error":"Error: Missing required params from body: build_version, version, Service id: 8bb52ec6-7418-487a-a198-15e2131c0b33"}
I've never seen that before .
Sadly AppCenter have also removed a bunch of documentation but there is this PR that suggests we need to set buildVersion and version for DMG files. I can't yet find where this is documented in the API though.
https://github.com/microsoft/appcenter-cli/pull/683/files
I can try and have a go at fixing this assuming that the PR I linked is valid but it would be nice to confirm this in documentation form from AppCenter.
Hi Mez Pahlan
I have not edited the file name. It is not showing the file name in my Jenkins output.
DMG upload requires both build version and build number when i did a manual upload from app center portal
Are people able to upload .dmg files with out issue with the plugin? I am not sure if i am missing any thing in my parameters. I added version for build version.
Thanks Srilakshmi
Hi srilakshmi apologies for the delay. Unfortunately not
I've raised an issue with Microsoft about the documentation but haven't had a chance to look into this further. https://github.com/MicrosoftDocs/appcenter-docs/issues/1083
PRs from other contributors are welcome. I'd just like to confirm that this is the correct thing to do before proceeding by way of referencing som official documentation.
Hi mezpahlan
I will try using the appcenter cli to upload the dmg to know the necessary parameters. I will update you tomorrow.
Thanks for looking into it.
Srilakshmi
Thanks srilakshmi can you also post the rest of the stack trace along with the error message you've already posted? There should be a better clue as to what endpoint this is coming from. Cheers.