aws / aws-toolkit-visual-studio

AWS Toolkit for Visual Studio - a plugin to interact with AWS
https://aws.amazon.com/visualstudio/
Apache License 2.0
108 stars 29 forks source link

Publish to AWS - Error: "The AWS CDK Bootstrap ... has failed." #257

Open HerbertScroggins opened 2 years ago

HerbertScroggins commented 2 years ago

Describe the bug Attempting to Publish simple app to AWS, the process fails during the step "Generating AWS Cloud Development Kit (AWS CDK) deployment project" with the final error "The AWS CDK Bootstrap, which is the process of provisioning initial resources for the deployment environment, has failed."

To Reproduce

  1. Create very simple console app
  2. Right click Project and choose "Publish to AWS"
  3. Press Publish
  4. Console displays process output and ends with...

Generating AWS Cloud Development Kit (AWS CDK) deployment project npm WARN config global --global, --local are deprecated. Use --location=global instead. Using bootstrapping template from C:\Users\xxxx\.aws-dotnet-deploy\CDKBootstrapTemplate.yaml Unhandled exception. Amazon.JSII.Runtime.JsiiException: Child process exited unexpectedly! at Amazon.JSII.Runtime.Services.Runtime.ReadResponse() at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]() at Amazon.JSII.Runtime.Services.Client.Hello() at Amazon.JSII.Runtime.Services.ServiceContainer.BuildServiceProvider(ILoggerFactory loggerFactoryOverride) at Amazon.JSII.Runtime.Services.ServiceContainer.<>c.<.cctor>b__8_0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy1.get_Value() at Amazon.JSII.Runtime.Services.ServiceContainer.get_ServiceProvider() at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly) at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly) at Amazon.JSII.Runtime.Deputy.DeputyBase..ctor(DeputyProps props) at Constructs.Construct..ctor(DeputyProps props) at Amazon.CDK.Stage..ctor(DeputyProps props) at Amazon.CDK.App..ctor(IAppProps props) at MikeConsoleApp1.Program.Main(String[] args) in C:\Users\xxxx.aws-dotnet-deploy\Projects\vmd4fl0a\Program.cs:line 15

Expected behavior No error and service to be successfully deployed.

Computer (please complete the following information):

Additional context Error also occurs if "Edit settings" is used to customise target environment to use pre-existing resources such as clusters, roles - no change in result. Also tried both service and scheduled.

96malhar commented 2 years ago

Is there a space in the user profile?

HerbertScroggins commented 2 years ago

Sorry, which user profile are you referring to? In the o/s or something else? This is on a completely fresh built PC with a 1tb drive, loads of room if that's what you meant.

96malhar commented 2 years ago

I meant is there an empty space (" ") in the C:\Users\<user-profile> ?

HerbertScroggins commented 2 years ago

Ah gotcha, seen that issue elsewhere, no there is no space in the user name part of the path.

philasmar commented 2 years ago

Could you please provide more of the error log, maybe there are additional details that can help debug this issue? Also, if you log into the AWS Console and go to CloudFormation, do you see a stack called CDKToolkit? If so, what is the stack status? Are there any failed events? If so, could you provide the error messages?

github-actions[bot] commented 6 days ago

This issue is missing required information and will be closed in 7 days. To keep the issue open, leave a comment.