✔ Synced UI components is taking a long time
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16
Amplify CLI Version
11.0.3
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
After doing a amplify push --forcePush --yes and amplify finishes all the tasks. My cli gets stuck for quite a long time in
✔ Synced UI components. then eventually "releases" the job so I can continue with my terminal.
Expected behavior
Not sure if this is a bug, but it's definitively a BAD experience as I have no idea on what's going on during this time. To be honest, I have no idea what "✔ Synced UI components." means at all as I can't find on any documentation (or maybe I haven't looked hard enough).
Thing is, I was forced to install "@aws-amplify/ui-components which I don't use anywhere, and since then I'm getting this message. I built my own components using the API, so I don't need UI components.
According to ChatGPT (I know, I even tried to resource to it lol). If this is documented anywhere, please let me know.
When you see the message "✔ Synced UI components" in the context of an AmplifyJS project, it means that the process of synchronizing your local user interface (UI) components with the cloud has been completed successfully.
AmplifyJS is a library that helps you build cloud-powered web and mobile applications. It simplifies the process of integrating backend services, such as authentication, storage, and APIs, into your application. The Amplify CLI and Amplify Console are tools that make it easier to deploy, manage, and synchronize your application's resources.
During the deployment process, the Amplify Console checks for updates to the UI components in your project and synchronizes them with the corresponding resources in the cloud. This ensures that your deployed application has the most recent version of the UI components, providing a seamless experience for your users.
In short, the message "✔ Synced UI components" is a confirmation that your local UI components have been successfully uploaded and synchronized with your cloud resources.
So, the expected behaviour? Either some sort of feedback on what is happening during this syncing and how long it might take. OR, even, why I need to install and have that sync in the first place since I am not using it AT ALL.
Reproduction steps
- Install "@aws-amplify/ui-components
- cli to amplify push --forcePush --yes
- wait
- should happen right in the end of the push
Project Identifier
No response
Log output
# Put your logs below this line
Additional information
No response
Before submitting, please confirm:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
Hey @rafaelfaria, by any chance do you have studio enabled for the application? if yes, does the UI builder have any components added?
@ykethan I have studio enabled, although I never really used it. And I'm gonna say no for UI builder having any components added since I don't even know what is that. :)
Hey @rafaelfaria, from the information looks like the Amplify project may contain forms generated by the UI builder. By an chance do you observe an ui-components folder under src directory or forms on UI builder in Amplify Studio?
As when enabling Amplify Studio which contains a GraphQL API, UI builder will auto generate forms. When running push or pull Amplify CLI will Sync the components and then codegen will generate the components locally. If your application contains a large schema and the UI builder has auto generated the forms for all the models the codegen may take time to generate UI components locally.
@ykethan Yeah, it does generate the ui-components folder with a bunch of forms. How do I remove this dependency? Do I need to disable Amplify studio?
Thanks
Hey @rafaelfaria, thank you for confirming the information. Does the project utilize Amplify Studio for any of it functionalities? if no, you could disable studio on the AWS Amplify console. If the project only utilizes certain features that doesn't require UI capabilities provided by Studio, you can disable the auto generate forms option on Studio UI builder settings and delete the forms on Studio. On the next pull the local generated forms should be removed.
@ykethan I am not using anything from Amplify Studio. So I decided to disable it.
Now I can't push things from my cli.
When I choose AWS profile which I have already configured, I get
✖ There was an error pulling the backend environment prod.
🛑 The AWS Access Key Id you provided does not exist in our records.

And if you are wondering why i need to push things manually from my command line (https://github.com/aws-amplify/amplify-cli/issues/11292) this is why.
Re-enabling amplify studio, allowed me to log in to the studio again and push it through. This means, I'm stuck with amplify studio even thou I'm not using it.
I can't find where I disabled the forms generation. Can you help me?
Hey @rafaelfaria, sorry to hear about your experience. We can disable form generation on Studio UI builder,
- opening studio
- select UI builder on the left menu
- select UI Library setting

- toggle Form setting off and save
This should automatically remove your existing forms. You may need to manually remove any imported components or manually created forms. - you will need to run pull to sync your changes.
Additionally, i am curious on the errors you are encountering. As I tried disabling studio on a existing locally pulled, then made a modification on the schema file locally and ran force push but I was unable to reproduce the error.
Could you check file local-aws-info.json present in .config folder under amplify folder and check if the profileName is same as the profile you created/configured in amplify or aws credentials file in the home directory?
additionally, could you try adding a --debug flag to check if CLI throws any additional error info.
@ykethan I don't have "UI Builder in my left menu", I have "UI Library" However, I don't think I can access this page.
I get stuck on "Something awesome is coming..." and the page never loads.

hey @rafaelfaria, my apologies yes its the UI Library page. Could you let us know if you observe any errors in the browser console?
additionally, would you be open to reaching out to me on discord: my handle is ykethan#5706. I would like to dive deeper into the issues on a call.
Hi, @ykethan as per your request, here is the screenshot from my console.

hey @rafaelfaria, this issue seems to related to https://github.com/aws-amplify/amplify-cli/issues/12425 which i was able to reproduce. running amplify configure project and reselecting the profile fixed the issue.
For the issue on Amplify studio, on discussing with the Studio team I was able to find that this workflow is currently not supported. But is being tracked internally to mitigate the behaviour of Studio UI not being able to load and provide better error messaging when utilizing split schema.
thank you for taking the time in diving into this behaviour on a call and providing us valuable feedback.
No worries @ykethan thanks for looking at the issue. I will try the workaround and report it back.
I am facing the same issue and somehow the switch component is disabled so I can't turn it off.

Hey @ericlo23, does your GraphQL API have conflict resolution enabled?
could you provide us additional information on the behaviour you are experiencing?
do you see any forms created in your UI builder as follows?

Hello @ykethan, thank you for your response. I am currently facing a situation similar to rafaelfaria's. I am unsure why the Amplify CLI is generating forms in the ui-components/ folder for me, as I have never used these forms and do not know how to disable them.
To answer your question, I am not entirely certain what conflict resolution entails, but I do not believe I have enabled it. This can be seen in the following image:

Furthermore, no forms have been created in the builder:

What I do have is a model named Notification, for which the Amplify CLI consistently generates forms.

As a workaround, I could add ui-components/ to the .gitignore file, but this does not solve the issue of the CLI generating the forms every time, which can be time-consuming. I would appreciate your assistance in turning off the code generation.
Hey @ericlo23, on discussing with the team I was able to find that this is currently the expected behaviour. The forms will be generated locally even if the conflict resolution is turned off. The Amplify Studio team is currently tracking this behaviour and are looking into improving this behaviour.
@rafaelfaria created a feature request to provide a spinner or loading bar for the local component generation to show current progress or status. https://github.com/aws-amplify/amplify-studio/issues/910
Hey @ykethan
I tried to turn amplify studio off, and run the amplify configure <myCurrentProjectName> and nothing happens.
When I try to run just amplify configure its asking to create a new profile.
None of the options allows me to choose an existing laws profile.
$ amplify configure
Follow these steps to set up access to your AWS account:
Sign in to your AWS administrator account:
https://console.aws.amazon.com/
Press Enter to continue
Specify the AWS Region
? region: us-east-1
Follow the instructions at
https://docs.amplify.aws/cli/start/install/#configure-the-amplify-cli
to complete the user creation in the AWS console
https://console.aws.amazon.com/iamv2/home#/users/create
Press Enter to continue
Enter the access key of the newly created user:
? accessKeyId: [hidden]