aws / aws/aws-toolkit-azure-devops

##[error]'charmap' codec can't encode characters in position 1098-1135: character maps to <undefined>

Open
#503 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

**To reproduce**

1. Create release pipeline from Azure DevOps
2. Add task AWS Toolkit for Azure DevOps.
3. Input the following inline code by Powershell.
4. `$SsmListCommand = aws ssm list-command-invocations --instance-id $InstanceId --no-details | ConvertFrom-Json`
5. You will get the error like the title.

**Expected behavior**

ConvertFrom-Json command should work properly.
*On my local PC it worked without this issue.

**Screenshots**
![image](https://user-images.githubusercontent.com/124340361/216533799-691b3ca7-ce48-414e-bbcf-9b99f432a995.png)

**Your Environment**

- On-prem or cloud based?:
- Azure DevOps version:
- AWS Toolkit for Azure DevOps version:

**Additional context**
It seems the result of "aws ssm list-command-invocations --instance-id $InstanceId --no-details" contains garbled cahracter like this screenshot (yellow highlighted part)
![image](https://user-images.githubusercontent.com/124340361/216534233-69823ac5-ebb3-4fe5-b47e-b16f389a379c.png)
.
If the result doesn't contain this kind of garbled character this error doesn't occur.

Contributor guide

Open the contributing guide

Research direction

Reproduce the Azure DevOps release pipeline task with the AWS SSM list-command-invocations output shown in the report, then inspect how the PowerShell result is passed to ConvertFrom-Json. Done means the command handles output containing garbled or non-ASCII characters without the charmap encoding error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, powershell
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.