-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy.ps1 fails during UI Build due to UnicodeEncodeError #176
Comments
Good morning @daveinci, I'm working on reproducing this now and will circle back with you shortly once I have some answers on the best way to address this. Thank you so much for bringing this to my attention! |
Hey @daveinci, the root cause for this stems from how the Vite build process will emit an Unicode "checkmark" character, and then that being captured by PowerShell and redirected to a variable. Long story short, this is an issue with how this is handled in Windows systems, but there is something you can try as a workaround for now. Take a look at the fix in this link, which shows how to enable UTF-8 support in Windows: I would suggest enabling that for now and seeing if that unblocks you, and in the meantime I will continue working on a more permanent/universal fix for this issue. Please let me know if the above helps! |
Thanks @DCMattyG. I worked around by running the 'az acr build' commands manually. Enabling Control Panel -> Region -> Administrative -> Change system locale -> Beta: Use Unicode UTF-8 for worldwide language support would likely do the trick but appreciate you looking for the permanent/universal fix. Think that will help users. |
Hi @daveinci, this issue has been addressed in PR #181. For now, I've changed the output of the build to "warn" which will stop the Unicode output seen at the "info" level. I've tested four many hours trying to find a way to alleviate this via scripting, but it appears unless you enable UTF-8 support in Windows (as mentioned in my previous comment), nothing I've found through script changes has been able to alleviate this issue. I'll keep looking for a better workaround, but now this issue should be resolved. Please let me know if you have any further issues and we'll get right on them. Thanks again! |
Describe the bug
Running deploy.ps1 fails during UI build phase, specifically during vite install, due to handling of error received during vite installation when it returns a checkmark (character '\u2713') in its result. Running the commands manually work.
To Reproduce
Steps to reproduce the behavior:
RUN npm run build ---> Running in
| cf61f8120ed6 > [email protected] build > vite build vite v4.4.9 building for production... transforming...
| ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: 'charmap' codec can't encode
| character '\u2713' in position 0: character maps to Traceback (most recent call last): File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line
| 663, in execute File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line
| 726, in _run_jobs_serially File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line
| 697, in _run_job File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line
| 333, in call File
| "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acr/build.py", line 143, in acr_build File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acr/_stream_utils.py", line 58, in stream_logs File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acr/_stream_utils.py", line 143, in _stream_logs File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\colorama/ansitowin32.py", line 41, in write File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\colorama/ansitowin32.py", line 162, in write File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\colorama/ansitowin32.py", line 187, in write_and_convert File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\colorama/ansitowin32.py", line 195, in write_plain_text File "encodings\cp1252.py", line 19, in encode UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 0: character maps to To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Expected behavior
Expect deploy.ps1 to complete without error and ipam applications to be running in app service.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: