You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.TypeInitializationException: The type initializer for 'IteratorStack.Tests.IteratorStackTests' threw an exception.
System.TypeInitializationException
The type initializer for 'IteratorStack.Tests.IteratorStackTests' threw an exception.
at IteratorStack.Tests.IteratorStackTests.CheckValidity() in C:\dev\CdkTfTestFailExample\IteratorStack.Tests\IteratorStackTests.cs:line 15
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
System.ArgumentException
Could not infer JSII type for .NET type '_Proxy' (Parameter 'type')
at Amazon.JSII.Runtime.Services.Converters.FrameworkToJsiiConverter.InferType(IReferenceMap referenceMap, Type type)
at Amazon.JSII.Runtime.Services.Converters.FrameworkToJsiiConverter.InferType(IReferenceMap referenceMap, Object value)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.ConvertAny(Type type, IReferenceMap referenceMap, Object value)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvertPrimitive(Type type, IReferenceMap referenceMap, Object value, Boolean isOptional, PrimitiveType primitiveType, Object& result)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvert(IOptionalValue optionalValue, Type type, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.Services.Converters.FrameworkToJsiiConverter.TryConvert(IOptionalValue optionalValue, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.Deputy.DeputyBase.<>c__DisplayClass20_0.<ConvertArguments>b__0(Parameter parameter, Object frameworkArgument)
at System.Linq.Enumerable.ZipIterator[TFirst,TSecond,TResult](IEnumerable`1 first, IEnumerable`1 second, Func`3 resultSelector)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at Amazon.JSII.Runtime.Deputy.DeputyBase.ConvertArguments(Parameter[] parameters, Object[] arguments)
at Amazon.JSII.Runtime.Deputy.DeputyBase.<InvokeMethodCore>g__GetResult|18_0[T](<>c__DisplayClass18_0`1&)
at Amazon.JSII.Runtime.Deputy.DeputyBase.InvokeMethodCore[T](JsiiMethodAttribute methodAttribute, Object[] arguments, Func`3 beginFunc, Func`3 invokeFunc)
at Amazon.JSII.Runtime.Deputy.DeputyBase.InvokeStaticMethod[T](Type type, Type[] parameterTypes, Object[] arguments, String methodName)
at HashiCorp.Cdktf.Token.AsList(Object value, IEncodingOptions options)
at IteratorStack.IteratorStack..ctor(Construct scope, String id) in C:\dev\CdkTfTestFailExample\IteratorStack\IteratorStack.cs:line 47
at IteratorStack.Tests.IteratorStackTests..cctor() in C:\dev\CdkTfTestFailExample\IteratorStack.Tests\IteratorStackTests.cs:line 8
┌───────────────┬──────────────────┬─────────┬────────────┬───────────────────────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────┼──────────────────┼─────────┼────────────┼───────────────────────────────┼─────────────────┤
│ aws │ 5.38.0 │ ^0.20.0 │ │ HashiCorp.Cdktf.Providers.Aws │ 19.7.0 │
└───────────────┴──────────────────┴─────────┴────────────┴───────────────────────────────┴─────────────────┘
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
I'm interested in contributing a fix myself
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
rexebin
changed the title
TerraformIterator: Official example fails the test
TerraformIterator: Tests fail for official example of "Using Iterators on Complex Lists"
Feb 26, 2024
Expected Behavior
Tests should pass.
Actual Behavior
Example code: Using Iterators on Complex Lists
Test fails with error:
Steps to Reproduce
See repository:
https://github.com/rexebin/CdkTfTestFailExample
Run test to see failed messages with line 50 in IteratorStack.cs:
ValidationRecordFqdns = Token.AsList(recordsIterator.PluckProperty("fqdn"))
Comment out line 50, uncomment line 51 to see test pass.
Versions
language: csharp
cdktf-cli: 0.20.3
node: v20.11.0
cdktf: 0.20.3
constructs: 10.3.0
jsii: 1.94.0
terraform: 1.7.1
arch: x64
os: win32 10.0.22631
dotnet: 8.0.102
providers
HashiCorp.Cdktf.Providers.Aws (PREBUILT)
terraform provider version: 5.38.0
prebuilt provider version: 19.7.0
cdktf version: ^0.20.0
Providers
┌───────────────┬──────────────────┬─────────┬────────────┬───────────────────────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────┼──────────────────┼─────────┼────────────┼───────────────────────────────┼─────────────────┤
│ aws │ 5.38.0 │ ^0.20.0 │ │ HashiCorp.Cdktf.Providers.Aws │ 19.7.0 │
└───────────────┴──────────────────┴─────────┴────────────┴───────────────────────────────┴─────────────────┘
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: