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

Deployment fails for one environment #1046

Closed
5 tasks done
espenbye opened this issue Nov 18, 2022 · 7 comments
Closed
5 tasks done

Deployment fails for one environment #1046

espenbye opened this issue Nov 18, 2022 · 7 comments

Comments

@espenbye
Copy link

espenbye commented Nov 18, 2022

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

App Id

d3pgmzdoktuvon

AWS Region

eu-north-1

Amplify Hosting feature

Backend builds

Describe the bug

We are unable to deploy to our development environment in Amplify. One of our deployments failed, and after that, we haven't been able to redeploy - the same code is running in other environments.

After running amplify push (either locally or via a build), we get the following error:
Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"DEPLOYING"}

After searching for previous issues, some suggested deleting the deployment-state.json file from S3 and redeploying it. But unfortunately, that does not work either. After doing that, we receive the following error:
🛑 ["Index: 0 State: {\"deploy\":\"waitingForDeployment\"} Message: Resource is not in the state stackUpdateComplete"]

Expected behavior

It should build and deploy.

Reproduction steps

  1. amplify pull --appId d3pgmzdoktuvon --envName main
  2. amplify env checkout dev
  3. amplify push

Build Settings

No response

Log output

2022-11-18T08:26:21.994Z [INFO]: Rolled back (2 of 1)
2022-11-18T08:26:22.051Z [WARNING]: ✖ There was an error initializing your environment.
2022-11-18T08:26:22.052Z [INFO]: 🛑 ["Index: 0 State: {\"deploy\":\"waitingForDeployment\"} Message: Resource is not in the state stackUpdateComplete"]
2022-11-18T08:26:22.052Z [INFO]: Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2022-11-18T08:26:22.061Z [INFO]: 
2022-11-18T08:26:22.061Z [INFO]: Session Identifier: a75c9068-de97-4eab-a2a7-18e1c087efab
2022-11-18T08:26:22.287Z [ERROR]: !!! Build failed
2022-11-18T08:26:22.288Z [ERROR]: !!! Non-Zero Exit Code detected

Additional information

No response

@espenbye espenbye added bug Something isn't working pending-triage labels Nov 18, 2022
@espenbye
Copy link
Author

Skjermbilde_2022-11-17_kl _21 01 13

CLI says it's deploying, but I cannot see any traces of it in CloudFormation.

@espenbye
Copy link
Author

Any tips to get it working again? Is the only option to remove the environment and set it up again?

@ghost ghost self-assigned this Nov 29, 2022
@ghost
Copy link

ghost commented Nov 29, 2022

Hi @espenbye apologies for the delay. We are investigating this to find another potential workaround to get your environment out of this state and will update shortly.

@ghost ghost transferred this issue from aws-amplify/amplify-hosting Nov 29, 2022
@ghost
Copy link

ghost commented Nov 29, 2022

Is there any additional logging before or after the Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"DEPLOYING"} error?

@espenbye
Copy link
Author

Hi @espenbye apologies for the delay. We are investigating this to find another potential workaround to get your environment out of this state and will update shortly.

No worries. Since we was not able to get it up and working again, we just created a new environment- so it's no longer an issue for us. But let me know if you still need any logs ☺️

@jcary741
Copy link

jcary741 commented Mar 7, 2023

For anyone else that ends up with a stuck deployment like this, one option is to go to the appropriate amplify-*-deployment bucket and remove the deployment-state.json file there, then re-deploying via the CLI. I ran into this after terminating a stuck deployment.

Copy link

github-actions bot commented Apr 4, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants