question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CDK for .NET cannot handle Swedish characters in TEMP/TMP path

See original GitHub issue

CDK for .NET Core does not seem to be able to handle paths with non-ascii characters in them. My username in Windows is having an å character, which seems to cause an issue becuase the TEMP folder contains that letter in it’s path.

Reproduction Steps

  • SET TMP to c:\path_with_å_in_it
  • Run cdk synthesize, where you have a csharp project (or any cdk command it seems)

Error Log

An exception is thrown:

Unhandled exception. Amazon.JSII.Runtime.JsiiException: ENOENT: no such file or directory, stat 'C:\Users\PerG´┐¢rdebrink\AppData\Local\Temp\x0c4glzt.kiq\Amazon.CDK.CloudAssembly.Schema.aws-cdk-cloud-assembly-schema-1.33.1.tgz'

Environment

  • CLI Version : 1.33.1
  • Framework Version: .NET Core 3.1
  • OS : Windows 10 (1909)
  • Language : Swedish

Other

Unhandled exception. Amazon.JSII.Runtime.JsiiException: ENOENT: no such file or directory, stat 'C:\Users\PerG´┐¢rdebrink\AppData\Local\Temp\x0c4glzt.kiq\Amazon.CDK.CloudAssembly.Schema.aws-cdk-cloud-assembly-schema-1.33.1.tgz'
   at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
   at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
   at Amazon.JSII.Runtime.Services.Client.Send[TRequest,TResponse](TRequest requestObject)
   at Amazon.JSII.Runtime.Services.Client.Load(LoadRequest request)
   at Amazon.JSII.Runtime.Services.Client.Load(String name, String version, String tarball)
   at Amazon.JSII.Runtime.Services.Client.LoadPackage(String package, String version, String tarballPath)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase..ctor(Type nativeType, String fullyQualifiedName)
   at Amazon.JSII.Runtime.Deputy.JsiiClassAttribute..ctor(Type nativeType, String fullyQualifiedName, String parametersJson)
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
   at Amazon.JSII.Runtime.ReflectionUtils.GetClassAttribute(Type type)
   at Amazon.JSII.Runtime.Deputy.DeputyBase..ctor(DeputyProps props)
   at Constructs.Construct..ctor(DeputyProps props)
   at Amazon.CDK.Construct..ctor(DeputyProps props)
   at Amazon.CDK.App..ctor(IAppProps props)
   at Temp.Program.Main(String[] args) in C:\git\temp\src\Temp\Program.cs:line 12
Subprocess exited with error 3762504530

This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
pergardebrinkcommented, Aug 17, 2020

When looking at this again, I wonder if its a JSII + Windows issue and not specific to those characters. @RomainMuller does this look familiar relating to recent windows fixes in JSII?

I suspect that it’s some kind of encoding/decoding issue and that the problem is generally related to non-ascii characters?

Btw, I see that the exception I wrote in the issue was when the TMP was set to my windows profile folder name. If you set TMP to the path in the step above, the exception message would of course be something like Unhandled exception. Amazon.JSII.Runtime.JsiiException: ENOENT: no such file or directory, stat 'C:\path_with_´┐¢in_it\x0c4glzt.kiq\Amazon.CDK.CloudAssembly.Schema.aws-cdk-cloud-assembly-schema-1.33.1.tgz'

Let me know if you need more information to reproduce the issue or if you want me to provide more information

0reactions
github-actions[bot]commented, Jun 21, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >
C# HttpClient handle swedish characters åäö in response
I have tried setting the Accept-Language header to sv-SE and sv but with the same result. I have also tried getting GetByteArrayAsync and ......
Read more >
Cannot interpret scandinavian letters - RStudio IDE
Hi, After updating R and Rstudio, I am no longer able to read files containing Scandinavian letters (æ,ø,å). I have a folder "New...
Read more >
Swedish characters in os.listdir - Forums - IBM Support
Hi,. I'm trying to loop over a list of directories, but I fail when the directory names contains special swedish characters. I set...
Read more >
Using URL encoding to handle special characters in a ...
This article will take advantage of inbuilt functions (and encode method of java.net.URLEncoder class) and showcase their usage via a couple of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found