microsoft / windows-dev-center-vsts-extension

Visual Studio Team Services (VSTS) extension for performing continuous delivery to the Windows Dev Center store from your automated CI builds
Other
42 stars 17 forks source link

Pushing packages to Test Flight fails #40

Closed JKennedy24 closed 7 years ago

JKennedy24 commented 7 years ago

I am trying to push a package to Test Flight but keep getting the same error no matter what I try.

The error is:

Obtaining flight resource for flight MyApp Test in app undefined 2017-08-03T14:59:15.2069903Z ##[error]Status 400: {"code":"InvalidParameterValue","data":[],"details":[],"message":"The parameter value is invalid","source":"Ingestion Api","target":"authorization"}

I cannot work out what this error means in plain english so I am stabbing in the dark a bit on it.

More info from the Log on the agent:

[2017-08-03 14:59:11Z INFO StepsRunner] Processing step: DisplayName='Flight $(SYSTEM.ARTIFACTSDIRECTORY)*\.appxupload to MyApp Test', ContinueOnError=False, Enabled=True [2017-08-03 14:59:11Z INFO ExpressionManager] Evaluating: succeeded() [2017-08-03 14:59:11Z INFO ExpressionManager] Expanded: True [2017-08-03 14:59:11Z INFO ExpressionManager] Result: True [2017-08-03 14:59:11Z INFO StepsRunner] Starting the step. [2017-08-03 14:59:11Z INFO TaskManager] Loading task definition 'C:\agent_work_tasks\store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc\0.2.12\task.json'. [2017-08-03 14:59:11Z ERR TaskRunner] System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.Path.GetFullPath(String path) at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.TranslateFilePathInput(String inputValue)

kp101090 commented 7 years ago

Hi JKennedy24! Most likely you passed $(SYSTEM.ARTIFACTSDIRECTORY)***.appxupload as value for Package File input. Did you intend to put $(SYSTEM.ARTIFACTSDIRECTORY)\**\*.appxupload?

JKennedy24 commented 7 years ago

@kp101090 I did want to upload appxupload. From this answer I concluded appxupload was what I needed to upload for Windows Store and then I would promote it to release.

I have also tried the path:

$(System.DefaultWorkingDirectory)/Daily Build - Xamarin.UWP/drop/MyApp.UWP_1.14.0.0_x86_x64_ARM_bundle_AppStore.appxupload

But it returned the same error.

Is what I'm doing not correct?

kp101090 commented 7 years ago

Interesting! In the flight task, can you try specifying ID as "App identification method" instead of Primary name and then pass ID of your app (found in the URL for the application's page on the Dev Center) in Application ID input? I am suspecting of a bug in our code.

JKennedy24 commented 7 years ago

Ok so last week I manually uploaded a Test flight package (before there wasn't one) and I thought that might be the error.

I ran a Release before changing the Primary name to ID and one after changing the Primary Name to use ID and both times I got the same error:

2017-09-18T08:41:30.7834270Z ##[error]Error: At least one package must be provided 2017-09-18T08:41:30.7852410Z at gatherParams (/Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:58:15) 2017-09-18T08:41:30.7874430Z at /Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:94:30 2017-09-18T08:41:30.7891920Z at next (native) 2017-09-18T08:41:30.7909620Z at /Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:10:65 2017-09-18T08:41:30.7931380Z at __awaiter (/Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:6:12) 2017-09-18T08:41:30.7953190Z at main (/Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:92:12) 2017-09-18T08:41:30.7976180Z at Object. (/Users/chrisjohn/myagent/_work/_tasks/store-flight_13dee6a7-3698-4b12-bbb4-b393560a3ebc/0.2.13/local/flightUi.js:107:1) 2017-09-18T08:41:30.7995250Z at Module._compile (module.js:570:32) 2017-09-18T08:41:30.8009520Z at Object.Module._extensions..js (module.js:579:10) 2017-09-18T08:41:30.8023700Z at Module.load (module.js:487:32) 2017-09-18T08:41:30.8074320Z ##[error]Error: At least one package must be provided

I am also not using any wildcards in my package path and am trying to use the .appxupload package

I'm guessing the error above relates to this line

Any thoughts?

JKennedy24 commented 7 years ago

Ok so I think I may have realised why the error above occured. I incremented the version number so the path:

$(System.DefaultWorkingDirectory)/Daily Build - Xamarin.UWP/drop/MyApp.UWP_1.14.0.0_x86_x64_ARM_bundle_AppStore.appxupload

Didn't exist anymore. I changed it to:

$(SYSTEM.ARTIFACTSDIRECTORY)\*\.appxupload

So the original bug was either caused by

  1. not uploading an initial test flight package before using automated upload
  2. using app name instead of app id (suspect app name does not work correctly)

But this then created another Issue the error returned is:

Uploading zip file... 2017-09-18T13:29:22.6920603Z ##[error]Failed to upload file! Error = StorageError: Operation could not be completed within the specified time. 2017-09-18T13:29:22.6920603Z RequestId:ffebe079-001e-0014-7581-304b34000000 2017-09-18T13:29:22.6920603Z Time:2017-09-18T13:29:22.2894358Z 2017-09-18T13:29:22.6920603Z ##[error]Failed to upload file! Error = StorageError: Operation could not be completed within the specified time.

JKennedy24 commented 7 years ago

Ok second attempt to upload worked!

kp101090 commented 7 years ago

I am glad that you were able to resolve the issue! We will do more testing on our end to verify providing primary app name is working as expected.

JKennedy24 commented 7 years ago

Thanks @kp101090. I'll close this issue and leave the testing up to you. On my next release I'll also try changing it back to primary name and test it works