Skip to content
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

Unable to answer prompt when quitting sandbox mode #1247

Closed
kokokosal opened this issue Apr 4, 2024 · 6 comments
Closed

Unable to answer prompt when quitting sandbox mode #1247

kokokosal opened this issue Apr 4, 2024 · 6 comments
Labels
pending-response Issue is pending response from author pending-triage Incoming issues that need categorization sandbox Related to the sandbox experience

Comments

@kokokosal
Copy link

Environment information

System:
  OS: Windows 10 10.0.19044
  CPU: (12) x64 AMD Ryzen 5 PRO 4650U with Radeon Graphics
  Memory: 3.45 GB / 15.33 GB
Binaries:
  Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
  Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
  npm: 9.3.1 - C:\Program Files\nodejs\npm.CMD
  pnpm: 8.15.5 - ~\AppData\Roaming\npm\pnpm.CMD
NPM Packages:
  @aws-amplify/backend: 0.13.0-beta.15
  @aws-amplify/backend-cli: 0.12.0-beta.17
  aws-amplify: 6.0.27
  aws-cdk: 2.135.0
  aws-cdk-lib: 2.135.0
  typescript: 5.4.3
AWS environment variables:
  AWS_DEFAULT_REGION = us-east-1
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_PROFILE = myprofile
  AWS_SDK_LOAD_CONFIG = 1
  AWS_STS_REGIONAL_ENDPOINTS = regional
No CDK environment variables

Description

While running amplify sandbox, pressing Ctrl+C to quit shows a prompt that can't be answeredx, because Powershell immediately asks about terminating batch job.

image

@kokokosal kokokosal added the pending-triage Incoming issues that need categorization label Apr 4, 2024
@ykethan
Copy link
Member

ykethan commented Apr 5, 2024

Hey @kokokosal, thank you for reaching out. I was unable to reproduce the immediate prompt on a Powershell window but did notice the second prompt after the delete.

? Would you like to delete all the resources in your sandbox environment (This cannot be undone)? y
[Sandbox] Deleting all the resources in the sandbox environment...
amplify-repro-yketh-sandbox-0021362c4d: destroying... [1/1]
amplify-repro-yketh-sandbox-0021362c4d-auth179371D7-11OG3OAPCC8JH |   0 | 11:34:18 a.m. | DELETE_IN_PROGRESS   | AWS::CloudFormation::Stack | amplify-repro-yketh-sandbox-0021362c4d-auth179371D7-11OG3OAPCC8JH User Initiated
amplify-repro-yketh-sandbox-0021362c4d-auth179371D7-11OG3OAPCC8JH |   0 | 11:34:20 a.m. | DELETE_IN_PROGRESS   | AWS::Cognito::IdentityPoolRoleAttachment | auth/amplifyAuth/IdentityPoolRoleAttachment (amplifyAuthIdentityPoolRoleAttachment045F17C8)
amplify-repro-yketh-sandbox-0021362c4d-auth179371D7-11OG3OAPCC8JH |   0 | 11:34:20 a.m. | DELETE_IN_PROGRESS   | AWS::CDK::Metadata         | auth/CDKMetadata/Default (CDKMetadata)
amplify-repro-yketh-sandbox-0021362c4d |   0 | 11:34:15 a.m. | DELETE_IN_PROGRESS   | AWS::CloudFormation::Stack | amplify-repro-yketh-sandbox-0021362c4d User Initiated
amplify-repro-yketh-sandbox-0021362c4d |   0 | 11:34:17 a.m. | DELETE_IN_PROGRESS   | AWS::CDK::Metadata         | auth/CDKMetadata/Default (CDKMetadata)
amplify-repro-yketh-sandbox-0021362c4d |   0 | 11:34:17 a.m. | DELETE_IN_PROGRESS   | AWS::CloudFormation::Stack | auth.NestedStack/auth.NestedStackResource (auth179371D7)
amplify-repro-yketh-sandbox-0021362c4d |   1 | 11:34:18 a.m. | DELETE_COMPLETE      | AWS::CDK::Metadata         | auth/CDKMetadata/Default (CDKMetadata)

 ✅  amplify-repro-yketh-sandbox-0021362c4d: destroyed

[Sandbox] Finished deleting.
Terminate batch job (Y/N)? y

wanted to get some additional information, Did you observe this in a VScode-integrated terminal or on a separate terminal window?
The version of the PowerShell being used v5.1 or v7?

@ykethan ykethan added sandbox Related to the sandbox experience pending-response Issue is pending response from author labels Apr 5, 2024
@kokokosal
Copy link
Author

This happens within VSCode terminal's Powershell.

$PSVersionTable 
Name                           Value
----                           -----
PSVersion                      5.1.19041.4170
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.4170
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Apr 5, 2024
@ykethan
Copy link
Member

ykethan commented Apr 8, 2024

Hey @kokokosal, thank you for the information. tried to reproduce the issue on both v5 and v7 powershell terminal on a separate windows and Vscode integrated terminal but did not observe an immediate exit/re-prompt on the terminal.
But i was able to reproduce the prompt when I ctrl + c twice. To ensure was there was double exit/ctrl + c input provided on the terminal?

@ykethan ykethan added the pending-response Issue is pending response from author label Apr 8, 2024
@kokokosal
Copy link
Author

I am pressing ctrl+c only once when encountering the error.

Two new clues or red herrings-

  1. Sometimes, and I can't pinpoint why it's inconsistent, pressing Enter while it says "File written: amplifyconfiguration.json" brings up the "delete all resources" prompt with a blue "N" prefilled as the answer. At that point, pressing enter does nothing. Pressing ctrl+c here invokes the original error by showing the prompt a second time, and with the Terminate message.
    image

  2. When I press Ctrl+C, the Terminate Batch Job prompt appears with "cmd" listed briefly as the shell, instead of powershell.
    amplify_shells

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Apr 9, 2024
@ykethan
Copy link
Member

ykethan commented Apr 19, 2024

@kokokosal thank you for the information and apologies on the delay. This appears to be side effect of .cmd, we do not have control over the additional prompt as its the default behaviour baked into the shell.
but did find a GitHub issue providing additional information: microsoft/terminal#217

@ykethan ykethan added the pending-response Issue is pending response from author label Apr 19, 2024
@ykethan
Copy link
Member

ykethan commented May 7, 2024

Closing the issue due to inactivity. Do you reach out to us if you need any assistance with Amplify.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-response Issue is pending response from author pending-triage Incoming issues that need categorization sandbox Related to the sandbox experience
Projects
None yet
Development

No branches or pull requests

2 participants