Amplify-cli: Amplify pull stuck on fetching updates (latest CLI version)

Created on 10 Jul 2020  ·  17Comments  ·  Source: aws-amplify/amplify-cli

Describe the bug
When running amplify pull on the latest CLI version, the console stays stuck on:

⠏ Fetching updates to backend environment: dev from the cloud.

Rolling back to 4.23.0 fixes the issue.

Amplify CLI Version
4.23.1

bug platform

Most helpful comment

@aavargasp
I was able to reproduce this - Working on a fix

All 17 comments

Hi @mdoesburg what categories are you using? Can you share your amplify status?

@jhockett

| Category      | Resource name               | Operation | Provider plugin   |
| ------------- | --------------------------- | --------- | ----------------- |
| Api           | xxxxxxApi                   | No Change | awscloudformation |
| Api           | xxxxxxDataSyncApi           | No Change | awscloudformation |
| Auth          | xxxxxxCognito               | No Change | awscloudformation |
| Auth          | userPoolGroups              | No Change | awscloudformation |
| Function      | xxxxxxUserMigration         | No Change | awscloudformation |
| Function      | xxxxxxDynamoTrigger         | No Change | awscloudformation |
| Function      | xxxxxxTestLambda            | No Change | awscloudformation |
| Function      | xxxxxxPreTokenGeneration    | No Change | awscloudformation |
| Function      | xxxxxxDataSync              | No Change | awscloudformation |
| Analytics     | xxxxxxPinpoint              | No Change | awscloudformation |
| Notifications | xxxxxxPinpoint              | No Change |                   |

version 4.24.0.

I got same issue today. I updated from 4.23 yesterday and today when do amplify pull or even amplify pull --restore it always freeze at Fetching updates to backend environment:... . i try to wait near 30 mins and it not finish. Check files on project look like download done, but terminal command freeze forever.

I started having the same problem after updating to version 4.24 and today I updated to 4.24.1 hoping that the issue was resolved but wasn't the case.

amplify --version
4.24.1

Here my project resources:

Current Environment: dev

| Category | Resource name              | Operation | Provider plugin   |
| -------- | -------------------------- | --------- | ----------------- |
| Auth     | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Function | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Function | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Function | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Function | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Api      | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |
| Api      | xxxxxxxxxxxxxxxxxxxxxxxxxx | No Change | awscloudformation |

The code is updated by the pull but the process is stuck in the message:

⠧ Fetching updates to backend environment: dev from the cloud.

System:

OS: Manjaro Linux x86_64 
Kernel: 5.6.16-1-MANJARO 
Shell: bash 5.0.17 

Just confirmed after downgrading that the issue is not present in version 4.23.0

@mdoesburg @TrungRueta @aavargasp
I setup a project and did a deploy, then I did an amplify pull. This command passed ok and I also tried to do a pull on an initiated project, though I'm not seeing the command hang for me.

Below is what I have in my project (dev and prod env)

➜  func git:(master) ✗ amplify status

Current Environment: prod

| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Api      | func          | No Change | awscloudformation |
| Function | gofunc        | No Change | awscloudformation |
| Auth     | func8a4a15e2  | No Change | awscloudformation |

GraphQL endpoint: https://xxxxxx.appsync-api.us-west-2.amazonaws.com/graphql
GraphQL API KEY: da2-xxxxx

I tried switching between env's, as noted by @damianrr in https://github.com/aws-amplify/amplify-cli/issues/4819, but it switched fine.

A few questions here for me to understand this issue better

  • Is there an auth trigger function? Is there anything that is unique to the auth workflow? (HostedUIAuth)? We can also reproduce this by sending over the amplify folder to us at [email protected]
  • Did this work before v 4.23.0? @aavargasp you mentioned this started at 4.24.1 which version did you previously upgrade from?

HI @SwaySway

I'm gonna try setting up a new project, because all of my projects were created with a previous version of amplify (don't know the exact versions but all of them prev v4.23)

About the questions:

  • No auth trigger or HostedUIAuth (that I know of). Sure i can send you the amplify folder, Any subject/body on the mail?
  • Yes it did and no it started at 4.24.0 (also on 4.24.1), I don't remember the exact version that I did the update from but think it was the 4.23

For reference this is my backend-config.json

{
    "auth": {
        "xxxxxxxxxxxxxxxxxxx": {
            "service": "Cognito",
            "providerPlugin": "awscloudformation",
            "dependsOn": []
        }
    },
    "function": {
        "xxxxxxxxxxxxxxxxxxx": {
            "build": true,
            "providerPlugin": "awscloudformation",
            "service": "Lambda"
        },
        "xxxxxxxxxxxxxxxxxxx": {
            "build": true,
            "providerPlugin": "awscloudformation",
            "service": "Lambda",
            "dependsOn": [
                {
                    "category": "function",
                    "resourceName": "xxxxxxxxxxxxxxxxxxx",
                    "attributes": [
                        "Name"
                    ]
                }
            ]
        },
        "xxxxxxxxxxxxxxxxxxx": {
            "build": true,
            "providerPlugin": "awscloudformation",
            "service": "Lambda",
            "dependsOn": [
                {
                    "category": "function",
                    "resourceName": "xxxxxxxxxxxxxxxxxxx",
                    "attributes": [
                        "Name"
                    ]
                }
            ]
        },
        "xxxxxxxxxxxxxxxxxxx": {
            "build": true,
            "providerPlugin": "awscloudformation",
            "service": "Lambda",
            "dependsOn": [
                {
                    "category": "function",
                    "resourceName": "xxxxxxxxxxxxxxxxxxx",
                    "attributes": [
                        "Name"
                    ]
                }
            ]
        }
    },
    "api": {
        "xxxxxxxxxxxxxxxxxxx": {
            "service": "API Gateway",
            "providerPlugin": "awscloudformation",
            "dependsOn": [
                {
                    "category": "function",
                    "resourceName": "xxxxxxxxxxxxxxxxxxx",
                    "attributes": [
                        "Name",
                        "Arn"
                    ]
                }
            ]
        },
        "xxxxxxxxxxxxxxxxxxx": {
            "service": "API Gateway",
            "providerPlugin": "awscloudformation",
            "dependsOn": [
                {
                    "category": "function",
                    "resourceName": "xxxxxxxxxxxxxxxxxxx",
                    "attributes": [
                        "Name",
                        "Arn"
                    ]
                }
            ]
        }
    }
}

@aavargasp
I was able to reproduce this - Working on a fix

I am experiencing the issue here, as well as the issue noted by @damianrr in #4819.

Closing this issue as the fix for this has been merged and is included in v4.24.2. Should you experience this again after v4.24.2 please comment below.

It's happening on v 4.27.2
I'm trying to update a function and a lambda layer,

It gets stuck on "Fetching updates to backend environment".

Current Environment: cloud

| Category | Resource name            | Operation | Provider plugin   |
| -------- | ------------------------ | --------- | ----------------- |
| Function | stripecreatesubscription | Update    | awscloudformation |
| Function | LambdaUtilitiesLayer     | Update    | awscloudformation |
| Auth     | cloudplatformappd77c98d5 | No Change | awscloudformation |
| Api      | cloudPlatformApi         | No Change | awscloudformation |
| Function | addusertogroup           | No Change | awscloudformation |

Update: After a few tries and waiting for 20 min it worked. Not sure where the problem was. Maybe some debug log would be useful here. ( Or additional output progress messages to know what's happening)

It's happening for me as well in v4.24.3
I created a new graphql api using amplify cli for my react native app, but it gets stuck infinitely after amplify push command.

Steps to reproduce
1.amplify init
2.amplify add api
3.amplify push

It gets stuck with message ⠏ Fetching updates to backend environment: dev from the cloud.


Current Environment: dev

| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Api      | greatorAppApi | Create    | awscloudformation |

Anyone has idea on how to resolve it?

@pragyajha updating the amplify-cli to the latest version may help, I know they have added some related patches and some activity log messages.

@pragyajha updating the amplify-cli to the latest version may help, I know they have added some related patches and some activity log messages.

@hugozap I updated version to 4.29.3, but still no luck:(

@pragyajha I've solved similar issues by deleting the amplify folder and then running the command copied from the Amplify Console to edit the backend e.g amplify pull --appId theAppId --envName prod
It will re create the amplify folder and you should be able to push.

I had exact the same issue, rolled cli back to 4.16.1 and it works again.

@pragyajha updating the amplify-cli to the latest version may help, I know they have added some related patches and some activity log messages.

@hugozap I updated version to 4.29.3, but still no luck:(

Just for anyone else on this issue. It was still happening for me with amplify 4.32.0. I worked out eventually it was the version of node I had.... upgraded from 14.0.0 to 14.2.0 and amplify works again using 4.32.0.

I updated nodeJS and deleted amplify folder.

Was this page helpful?
0 / 5 - 0 ratings