Amplify-cli: amplify cli 1.7.4 freezes when adding graphql api

Created on 20 Jun 2019  Â·  19Comments  Â·  Source: aws-amplify/amplify-cli

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.

bug platform

Most helpful comment

Thanks Amplify team for the quick fix!

All 19 comments

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?

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

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.

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.

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 :(

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

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

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

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.

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

https://github.com/SBoudrias/Inquirer.js/issues/811

we wil lock the version and roll out a fix soon

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

@damianrr

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

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

Thanks Amplify team for the quick fix!

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

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.

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings