-
Notifications
You must be signed in to change notification settings - Fork 822
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
Cannot Pull Amplify Project that has symlink the #current-cloud-backend in deployment bucket #13463
Comments
Hey @ottinochri, thank you for reaching out. Wanted to get some information on the changes made to the Could you try to temporarily disable studio on the AWS Amplify console, which should switch to your AWS profile configured locally, then run the pull command with |
@ykethan as of now, I just drop in the original current-cloud-backend zip so that I am able to log into amplify studio OR attempt an 'amplify pull' When I do the pull now (since my backend has been completely removed locally) it just says ENOENT: no such file or directory, stat <path to offending file in the .temp directory that no longer exists) I'm essentially stuck in a loop between not being able to pull when the original archive is in place because of the symlink, then if I remove the offending file and zip the directory back up for s3, then amplify studio cannot find the environment. |
Working with AWS Support I now see File at path: '/amplify/#current-cloud-backend/amplify-meta.json' does not exist. This is a new error, with the original #current-cloud-backend file in place (that has the symlink.) I've tried to fix this by dropping in the #current-cloud-backend copied from the s3 bucket so they match, but no luck. |
Hey @ottinochris, from the error it appears the |
I have verified that there is amplify-meta.json in the #current-cloud-backend.zip that exists within the deployment bucket. The error is referencing my local env. What I have tried to do is pull down the #current-cloud-backup. Unzip it and add it to my amplify directory locally to ensure they are the same, then re-run amplify pull. When I do that I see 'ProjectNotInitializedError: No Amplify backend project files detected within this folder.' |
@ottinochris as a quick test, could try pulling the project into a new empty folder outside the existing project directory using |
@ykethan so I was actually able to resolve the pull by removing the sim links and zipping the archive in the way [Etep15] recommended in the issue you linked. Once I was able to pull in the environment again, I just added a script to the main package.json that builds the layer with a --no-bin-links flag so the symlink won't be generated again. Looks to be working again. |
@ottinochris glad to hear that you were able to mitigate the issue. |
|
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.18.2
Amplify CLI Version
12.8.2
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.
I have tried to download the #current-cloud-backend.zip. Remove the symlink, zip and re-upload.
Describe the bug
I have a situation where I leverage Prisma in a lambda layer. It was working well and I was able to push until I had someone else try and pull then I would get an error saying that the symlink does not exist. Specifically ENOENT: no such file or directory, stat {path to symlink}
The error is similar to this issues #2948.
What I tried to do is delete the amplify directory for the backend of the project, download the #current-cloud-backend.zip, remove the symlink, zip the directory back up, and then add it back into S3. However when I do this and try to pull I get a messaging asking me to get credentials, then I'm routed to Amplify Studio, where selecting the environment is stuck in a loop.
If I add the original #current-cloud-backup.zip back to S3 then it resolves the amplify studio env selection issue (both for directory logging in or if prompted for credentials) but then obviously I'm back to the original symlink based pulling issue.
Expected behavior
I should be able to remove the amplify directory from my project, do
amplify pull
and it pull in the backend.Reproduction steps
Initialize a project.
Create a lambda layer with a symlink
do an amplify push
try and do an amplify pull and the issue will start showing up
bonus: delete the amplify directory locally and still pulling will fail
Project Identifier
Can't do this since there is no backend project folders locally anymore.
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: