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

Amplify Studio (React) / Amplify CLI - Pull the latest into your source code: NOT WORKING #601

Closed
3 tasks done
totallytotallyamazing opened this issue Jul 20, 2022 · 6 comments

Comments

@totallytotallyamazing
Copy link

totallytotallyamazing commented Jul 20, 2022

Before opening, please confirm:

App Id

d3sccysjsy5n81

Region

us-east-1

Environment name

reactappdemo

Amplify CLI Version

9.1.0

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

17.9.0

What operating system are you using?

Mac, Big Sir 11.6

Browser type?

Google Chrome Ver. 103.0.5060.114, Safari Ver. Latest

Describe the bug

When running the console command (Below) from VS Code Ver. 1.69.2 (Universal) terminal, in my root directory:

Screen Shot 2022-07-20 at 9 48 24 AM

The following error occurs repeatedly:

Screen Shot 2022-07-19 at 10 05 04 PM

Expected behavior

I expect the "pull" request to work

Reproduction steps

  1. I run console command "amplify pull --appId d3xxxxxxxxxxxxx --envName staging" from VS Code terminal in my root directory.
  2. Chrome browser window opens.
  3. I choose the button option to log in.
  4. It fails and gives the option to try again.
  5. I try again and get the same error repeatedly.

Additional information

I have tried multiple workarounds and none of them are working for me. Please Help!

@abhi7cr
Copy link
Contributor

abhi7cr commented Jul 21, 2022

Hi @totallytotallyamazing, thanks for reporting! Can you inspect the browser console logs for any errors ? One of the reasons we have seen this happen is due to a lack of permissions in your local computer.
Could you try running the command with sudo ?

@totallytotallyamazing
Copy link
Author

@abhi7cr Thank you for your reply! Based on a reply to a comment I made on another post, #84 (comment) I tried running with "sudo" command and it worked. It would be great if this was fixed or just updated in all of the Amazon AWS Amplify documentation, thanks again.

@abhi7cr
Copy link
Contributor

abhi7cr commented Jul 22, 2022

@totallytotallyamazing glad it worked! We are working to improve this scenario in the login experience, will update once we have it rolled out.

@johnpc
Copy link

johnpc commented Jul 29, 2022

@totallytotallyamazing was this your first time ever running amplify pull on any app on your device? Or did you ever run sudo amplify pull in the past before this issue arose?

Can you send your terminal output for ls -al ~/.amplify/admin/config.json? Is it owned by root?

Is this fixed by running chown -R $(whoami):$(id -gn) ~/.amplify? That should fix your permissions on all global amplify configurations.

@totallytotallyamazing
Copy link
Author

@johnpc Thank you for your suggestion but earlier I was able to edit those invisible files by making them visible and then making the appropriate changes with VS Code. Not sure if this was even necessary for my issue but it's good to be aware of these permissions since they can go bad.

Closing this issue out since I was able to solve my problem by running the pull command with "sudo" in front of it like this, "sudo amplify pull --appId d3xxxxxxxxxxxxx --envName staging".

@simongillett
Copy link

This is still an issue

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

No branches or pull requests

5 participants