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

amplify cli 1.7.4 freezes when adding graphql api #1688

Closed
mattiLeBlanc opened this issue Jun 20, 2019 · 20 comments · Fixed by #1690
Closed

amplify cli 1.7.4 freezes when adding graphql api #1688

mattiLeBlanc opened this issue Jun 20, 2019 · 20 comments · Fixed by #1690
Labels
bug Something isn't working platform Issues tied to the general CLI platform

Comments

@mattiLeBlanc
Copy link

mattiLeBlanc commented Jun 20, 2019

Describe the bug
Amplify 1.7.4
Running amplify add api and then choosing GrahpQL freezes terminal. I cannot type a api name or kill the process.

To Reproduce
Steps to reproduce the behavior:

  1. Go to project and run amplify add api
  2. Choose Graphql
  3. Try to type name...freezes
  4. See error

Expected behavior
I expect to be able to type the name

Desktop (please complete the following information):

  • OS: OSX 10.14.5
    -Terminal

Extra context
I was running 1.6.9 but any version new then that is having the same issue. I am going back to 1.6.9 and see what happen and maybe reboot my mac?

Update: even 1.6.9 now is freezing. Will try reboot first.
Issue not resolved. The CLI is hanging because some unknown reason.

@mattiLeBlanc
Copy link
Author

mattiLeBlanc commented Jun 20, 2019

I tried to do amplify configure, but when I am asked to add a user, the CLI is also frozen. Not sure what is going on here but it seems like it is waiting on a request from the AWS service which is maybe pending?

I have completely removed amplify globally, I checked that my npm and node are up to date. Not sure what else to try.

Update:
I installed AWS CLI and was able to create a new profile (I removed it from ~/.aws). So that CLI works but the amplify cli still freezes. I am completely blocked now. What can I do?

@nickchauhan
Copy link

Same is happening with me when I'm trying to add environment using Amplify CLI 1.7.4

amplify env add
Note: It is recommended to run this command from the root of your app directory
? Do you want to use an existing environment? No
? Enter a name for the environment

So when I try to enter the name of the environment it freezes

@thebutler12
Copy link

I am seeing the same thing when running 'amplify configure' after updating to 1.7.4. It was working fine in 1.6.5. It is getting stuck after i select a 'region' during the configure steps.

Running on OSX 10.12.6 with iTerm2.

@mattiLeBlanc
Copy link
Author

So when I run it on my private laptop, it doesn't freeze, so it is not my AWS username or anything like that. Also, I installed amplify yesterday and it is running at 1.7.4.
So it seems only the laptop where I upgraded from a 1.6.x to 1.7.4 did something irreversible.

@nfpreports
Copy link

So when I run it on my private laptop, it doesn't freeze, so it is not my AWS username or anything like that. Also, I installed amplify yesterday and it is running at 1.7.4.
So it seems only the laptop where I upgraded from a 1.6.x to 1.7.4 did something irreversible.

I'm having the same trouble - it worked fine 6 days ago when I was running through a tutorial. Tonight I go to set up a new project and 'amplify configure' askes for the region, then username and freezes :(

@matthewtgilbride
Copy link

I get the same running amplify init on OSX 10.14.5 with Terminal.

@DevilsNightsix
Copy link

I'm also getting this during amplify configure, terminal hangs on 'Specify the username of the new IAM user:'

@praisegeek
Copy link

I can confirm that @aws-amplify/cli version 1.7.4 started freezing after the upgrade. It freezes after passing through any first command.

@daajack
Copy link

daajack commented Jun 20, 2019

Same here with amplify configure/init (1.7.3 and 1.7.4). It stucks on the second question. The process can be killed from another console with kill -9 PROCESS_ID. I didn't found any error message.

@UnleashedMind UnleashedMind added the bug Something isn't working label Jun 20, 2019
@UnleashedMind
Copy link
Contributor

we root-caused this issue and it is due to a bug in one of the dependencies

SBoudrias/Inquirer.js#811

we wil lock the version and roll out a fix soon

@damianrr
Copy link

FWIW: It's also happening with amplify update function and is also happening in versions: 1.7.3, 1.7.2 and 1.7.1

UnleashedMind added a commit to UnleashedMind/amplify-cli that referenced this issue Jun 20, 2019
pin inquirer version to 6.3.1

fix aws-amplify#1688
@UnleashedMind
Copy link
Contributor

@damianrr

It happens if there is a fresh installation of the inquirer package

UnleashedMind added a commit that referenced this issue Jun 20, 2019
pin inquirer version to 6.3.1

fix #1688
@kaustavghosh06 kaustavghosh06 added the platform Issues tied to the general CLI platform label Jun 20, 2019
@kaustavghosh06
Copy link
Contributor

kaustavghosh06 commented Jun 20, 2019

We've fixed this issue. Please install the latest version of the CLI (v 1.7.5) which has this fix.

@mattiLeBlanc
Copy link
Author

Thanks Amplify team for the quick fix!

@GIOkafor
Copy link

I am still experiencing this issue in the CLI version (1.8.2) @kaustavghosh06

@skatolyk
Copy link

skatolyk commented Feb 8, 2020

Still happens on version @aws-amplify/[email protected]

amplify push
⠧ Fetching updates to backend environment: dev from the cloud.(node:35164) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): NoSuchBucket: The specified bucket does not exist
(node:35164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠋ Fetching updates to backend environment: dev from the cloud.

@ryudice
Copy link

ryudice commented Apr 17, 2020

It's happening to me as well, using version 4.17.1

@jeneiro
Copy link

jeneiro commented Jun 5, 2020

amplify push
still freezes
"aws-amplify": "^3.0.7"

Fetching updates to backend environment: master from the cloud.(node:19797) UnhandledPromiseRejectionWarning: CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
at IncomingMessage. (/home/ec2-user/.nvm/versions/node/v10.20.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/util.js:895:34)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:19797) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19797) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠴ Fetching updates to backend environment: master from the cloud.

@wojtik8
Copy link

wojtik8 commented Jul 30, 2020

It's happening to me as well, using version 4.17.1

Are you behind a corporate proxy? If so, this can be related to the Usage Data collection, which is being sent to the Internet each time you execute an amplify command. In my case opting out helped:

amplify configure --usage-data-off

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working platform Issues tied to the general CLI platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.