coc-extensions / coc-powershell

PowerShellEditorService integration for coc.vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

downloadPSES.ps1 is failing to download PSES

corbob opened this issue · comments

System Details

  • Version of coc-powershell (in Vim or NeoVim: :CocList extensions coc-powershell): git master branch
  • Operating System:
  • PowerShell version (in PowerShell: $PSVersionTable): 6.2.2 (and 5.1.something)

Issue Description

I am experiencing a problem with downloading PSES.

Expected Behaviour

Download PSES to the appropriate location.

Actual Behaviour

PowerShell 6.2.2:

Determining latest PowerShell Editor Services release...
Latest Release: v1.13.0
Downloading PowerShell Editor Services: v1.13.0
Invoke-WebRequest : 
NoSuchKeyThe specified key does not exist.36031537/f3b09080-dec1-11e9-8d4e-c1ba1fad71876C97CA7C937FCCA2RtSJjfM2979FzMEYkhxTRxkRkDBk4YZooVPjCpL2nAw1ZrtHL/I+zDuUhcNbMyfl5hCuZivIaks=
At /home/vsts/work/1/s/downloadPSES.ps1:29 char:1
+ Invoke-WebRequest $download -OutFile $zip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Method: GET, Reques\u2026PowerShell/6.2.3
}:HttpRequestMessage) [Invoke-WebRequest], HttpResponseException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
##[error]PowerShell exited with code '1'.

PowerShell 5.1:

Determining latest PowerShell Editor Services release...
Latest Release: v1.13.0
Downloading PowerShell Editor Services: v1.13.0
Invoke-WebRequest : The remote server returned an error: (404) Not Found.
At C:\code\coc-powershell\downloadPSES.ps1:29 char:1
+ Invoke-WebRequest $download -OutFile $zip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

I'll take a look at what's going on, in particular why we're getting different errors between Windows PowerShell and PowerShell Core. If I were to guess, this started happening with the recent update to PSES, but I can't say for sure. I noticed the build failing in #74

It would appear this is due to PSES not having compiled artifacts for the latest releases. I've opened an issue there: PowerShell/PowerShellEditorServices#1047

oops. Not sure why the zips failed to upload... this should be fixed now!