aaronparker / evergreen

Create evergreen Windows image build pipelines with the latest version numbers and download URLs for common applications
http://stealthpuppy.com/evergreen/
MIT License
375 stars 64 forks source link

[Bug]: GoogleChrome reports "Method invocation failed because [System.String] does not contain a method named 'ToShortDateString'" #668

Closed aaronparker closed 5 months ago

aaronparker commented 5 months ago

What happened?

Date property is not formatted correctly on Windows PowerShell with Invoke-RestMethod. GoogleChrome reports: Method invocation failed because [System.String] does not contain a method named 'ToShortDateString'

Version

2405.943

What PowerShell edition/s are you running Evergreen on?

Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows 10+

Have you reviewed the documentation?

Verbose output

VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.943\Apps\Get-GoogleChrome.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.943\Apps\Get-GoogleChrome.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.943\Apps\Get-GoogleChrome.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program
Files\WindowsPowerShell\Modules\Evergreen\2405.943\Manifests\GoogleChrome.json]
VERBOSE: Calling: Get-GoogleChrome.
VERBOSE: Get-GoogleChrome: Channel: Extended.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UseBasicParsing: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: MaximumRedirection: 2.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: DisableKeepAlive: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Method: Default.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Uri:
https://chromiumdash.appspot.com/fetch_releases?channel=Extended&platform=Windows&num=6&offset=0.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: ContentType: application/json; charset=utf-8.
VERBOSE: GET with 0-byte payload
VERBOSE: received 3628-byte response of content type application/json
VERBOSE: Get-GoogleChrome: Found version: 124.0.6367.118
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UseBasicParsing: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: MaximumRedirection: 2.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: DisableKeepAlive: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Method: Default.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Uri:
https://versionhistory.googleapis.com/v1/chrome/platforms/win64/channels/extended/versions/all/releases?filter=endtime=none.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: ContentType: application/json; charset=utf-8.
VERBOSE: GET with 0-byte payload
VERBOSE: received 602-byte response of content type application/json; charset=UTF-8
WARNING: Run 'Get-EvergreenApp -Name "GoogleChrome" -Verbose' to review additional details for troubleshooting.
Get-GoogleChrome : Method invocation failed because [System.String] does not contain a method named 'ToShortDateString'.
At C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.943\Public\Get-EvergreenApp.ps1:79 char:27
+                 $Output = & Get-$Name @params
+                           ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-GoogleChrome], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound,Get-GoogleChrome