.NET CDK 1.16.2 JsiiException exception on synth at CodeCommit.Repository.OnCommit #4989
Labels
bug
This issue is a bug.
language/dotnet
Related to .NET bindings
needs-triage
This issue or PR still needs to be triaged.
p0
After upgrading my working simple CI/CD CDK project from .NET CDK 1.11.0 to CDK 1.16.2, I started getting an exception with message:
Reproduction Steps
Plug the snippet below into your .NET CDK project and run it to see the exception.
Error Log
Environment
Other
Stack Trace
Amazon.JSII.Runtime.JsiiException: Amazon.JSII.Runtime.JsiiException: Amazon.JSII.Runtime.JsiiException: System.InvalidCastException: Unable to cast Amazon.JSII.Runtime.Deputy.AnonymousObject into Amazon.CDK.AWS.Events.IOnEventOptions
at Amazon.JSII.Runtime.Deputy.DeputyBase.ToType(Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Amazon.JSII.Runtime.Services.Converters.JsiiToFrameworkConverter.TryConvertClass(Type type, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvertCustomType(Type type, IReferenceMap referenceMap, Object value, Boolean isOptional, String fullyQualifiedName, Object& result)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvert(IOptionalValue optionalValue, Type type, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.CallbackExtensions.<>c__DisplayClass2_0.b__0(Int32 n)
at System.Linq.Enumerable.SelectRangeIterator
1.ToArray() at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)at Amazon.JSII.Runtime.CallbackExtensions.InvokeMethod(InvokeRequest request, IReferenceMap referenceMap)
at Amazon.JSII.Runtime.CallbackExtensions.InvokeCallbackCore(Callback callback, IReferenceMap referenceMap)
at Amazon.JSII.Runtime.CallbackExtensions.InvokeCallback(Callback callback, IReferenceMap referenceMap, IFrameworkToJsiiConverter converter, String& error)
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.Invoke(InvokeRequest request)
at Amazon.JSII.Runtime.Services.Client.Invoke(ObjectReference objectReference, String method, Object[] arguments)
at Amazon.JSII.Runtime.Deputy.DeputyBase.<>c__DisplayClass17_0
1.<InvokeInstanceMethod>b__1(IClient client, Object[] args) 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.InvokeInstanceMethod[T](Type[] parameterTypes, Object[] arguments, String methodName)
at Amazon.CDK.AWS.CodeCommit.Repository.OnCommit(String id, IOnCommitOptions options)
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.Invoke(InvokeRequest request)
at Amazon.JSII.Runtime.Services.Client.Invoke(ObjectReference objectReference, String method, Object[] arguments)
at Amazon.JSII.Runtime.Deputy.DeputyBase.<>c__DisplayClass17_0
1.<InvokeInstanceMethod>b__1(IClient client, Object[] args) 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.InvokeInstanceMethod[T](Type[] parameterTypes, Object[] arguments, String methodName)
at Amazon.CDK.AWS.CodePipeline.Actions.CodeCommitSourceAction.Bound(Construct scope, IStage stage, IActionBindOptions options)
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponseTResponse
at Amazon.JSII.Runtime.Services.Client.Invoke(InvokeRequest request)
at Amazon.JSII.Runtime.Services.Client.Invoke(ObjectReference objectReference, String method, Object[] arguments)
at Amazon.JSII.Runtime.Deputy.DeputyBase.<>c__DisplayClass17_0
1.<InvokeInstanceMethod>b__1(IClient client, Object[] args) 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.InvokeInstanceMethod[T](Type[] parameterTypes, Object[] arguments, String methodName)
at Amazon.CDK.AWS.CodePipeline.Actions.Action.Bind(Construct scope, IStage stage, IActionBindOptions options)
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: