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

#current-cloud-backend.zip and amplify-meta.json file not found after successful amplify pull #13732

Open
2 tasks done
nbtrieu opened this issue Apr 22, 2024 · 7 comments
Open
2 tasks done
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform-pull Issues related to `amplify pull`

Comments

@nbtrieu
Copy link

nbtrieu commented Apr 22, 2024

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v21.7.1

Amplify CLI Version

12.11.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

My local Git repository for my Amplify project could not be located by GitHub Desktop (This was actually the 3rd time this has happened and I have already opened a new issue regarding this on GitHub Support and am waiting for updates). So in the meantime, I thought I could try moving the local project somewhere else and re-cloning the remote repository. After the successful cloning to GitHub Desktop, at the root of my project directory, I ran amplify init to reinitialize the local setup and then ran amplify pull to pull the backend dev environment. I have tried this twice before and it worked both of those times, but this time I still cannot pull the #current-cloud-backend.zip and amplify-meta.json file (in addition to getting 2 duplicate cli.json files), despite there being no errors being logged during the pull process.

Screenshot 2024-04-22 at 1 57 04 PM Screenshot 2024-04-22 at 2 13 31 PM Screenshot 2024-04-22 at 1 57 55 PM Screenshot 2024-04-22 at 2 17 48 PM

Expected behavior

The presence of the #current-cloud-backend.zip and amplify-meta.json file in the backend directory after successfully running amplify pull

Reproduction steps

  1. Clone GitHub repo: https://github.com/nbtrieu/amplify-neptune
  2. Open Integrated Terminal at the root directory of the project
  3. Run amplify init and select AWS profile default for authentication
  4. Run amplify pull
  5. Check backend directory for #current-cloud-backend.zip and amplify-meta.json file

Project Identifier

Project Identifier: 7261380fdf0747b9fd120f54425d7758

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • 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.
@nbtrieu nbtrieu added the pending-triage Issue is pending triage label Apr 22, 2024
@ykethan
Copy link
Contributor

ykethan commented Apr 23, 2024

Hey @nbtrieu, from the information provided, this issue appears to be similar to #13335. was the project previously or currently being pulled into a folder that sync with cloud storage like iCloud or OneDrive?
Could you download the #current-cloud-backend.zip archive from the S3 deployment bucket on the console(the bucket name ends with -deployment and contains the name of the project) and check if the artifact contains any duplicate files?

@ykethan ykethan added pending-response Issue is pending response from the issue author platform-pull Issues related to `amplify pull` labels Apr 23, 2024
@nbtrieu
Copy link
Author

nbtrieu commented Apr 23, 2024

Hello @ykethan, thank you for your response! The project is being pulled into a folder that syncs with iCloud (although upload is still pending); should I disable syncing?
I have also downloaded the #current-cloud-backend.zip archive from the S3 deployment bucket and checked that it contains duplicate cli.json files (cli.json, cli 2.json, cli 3.json). Could this be related to the missing amplify-meta.json file in any way?

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

ykethan commented Apr 23, 2024

Hey @nbtrieu, before making any changes do you observe the amplify-meta.json in the #current-cloud-backend.zip?
if file is present, you can download the #current-cloud-backend.zip archive, unzip, carefully remove duplicate files, re-zip, and re-upload. do ensure when re-zipping the folder this does not created a nested folder in the zip.
then in new directory outside the existing project directory run amplify pull --appId <app-id> --envName <env-name> to check for a successful pull.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 23, 2024
@nbtrieu
Copy link
Author

nbtrieu commented Apr 23, 2024

Wait sorry so by "new directory outside the existing project directory" do you mean a new and empty directory?
Also when the modified #current-cloud-backend.zip is re-uploaded, will the previous archive be automatically overwritten?

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

ykethan commented Apr 24, 2024

@nbtrieu yes, for testing purposes create a new directory outside the existing path that may not be connected to a cloud backup service such as iCloud/OneDrive.
I would recommend keeping a copy of the #current-cloud-backend.zip locally before re-uploading the new version of #current-cloud-backend.zip containing the removed duplicated files. The re-upload should override the existing zip or you can deleted it in the s3 bucket and upload the new zip.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 24, 2024
@nbtrieu
Copy link
Author

nbtrieu commented Apr 24, 2024

Thank you for the clarification, I did as you said but now I cannot pull the backend at all...

Screenshot 2024-04-24 at 9 51 44 AM

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

ykethan commented Apr 24, 2024

@nbtrieu can add the --debug and rerun the pull.
how the does the new zip structure look like, do ensure when re-zipping the folder this does not created a nested #current-cloud-backend folder in the zip. this commonly happens when we try to right click the folder and zip it.
on the terminal you can also do

cd #current-cloud-backend/
zip -r "../#current-cloud-backend.zip" *

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 24, 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 the issue author pending-triage Issue is pending triage platform-pull Issues related to `amplify pull`
Projects
None yet
Development

No branches or pull requests

2 participants