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 Publish - BadRequestException: Operation not supported. App is already connected a repository. #4837

Closed
charleslouis opened this issue Jul 15, 2020 · 4 comments
Labels
documentation Add or update documentation hosting Issues tied to hosting category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@charleslouis
Copy link

charleslouis commented Jul 15, 2020

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

It is potentially linked to both CLI and Console in my opinion.
See below.

Describe the bug

On the CLI : Publishing Manually amplify publish ends up with Operation not supported. App is already connected a repository. despite having run amplify hosting remove and amplify hosting add again with option "Manual"

Amplify CLI Version

4.24.1

To Reproduce
Here is the course of events:

  • manually add CI/CD with Gitlab repo on console
  • CI/CD fails for some reasons on the backend build due to auth headless is missing the following inputParams facebookAppIdUserPool (while amplify push goes fine)
  • Then tried to amplify publish (Backend works - I just need to deploy frontend) -> fails due to CI/CD setup from console
  • Tried to reconnect / disconnect repo from console with no avail
  • ran amplify hosting remove then amplify hosting add to go back to manual
  • ran amplify publish -> ends up with Operation not supported. App is already connected a repository.

On the console side, it says "Repository is already connected to another app".
But I see no other app (deleted all older apps).

It is not possible to select a branch (see screenshot) - even if I select another repo.

Expected behavior
A clear and concise description of what you expected to happen.

on CLI being able to run amplify publish if in manual mode
OR on console being able to (re)implement CI/CD
OR is there a way to disconnect repo ?
OR is there a way to reconnect repo AND branch (I can select the repo, put the branches dropdown is empty)
OR is there a good way to clone my repo and init a new amplify app just to deploy frontend ?

In any way, I just want to publish the frontend without having to start the whole stack from scratch (again).
At least not at the moment.

Screenshots

image

image

Desktop (please complete the following information):

  • OS: Mac
  • Node Version v12.8.0

Additional context

In any way, I just want to publish my app without having to start the whole stack from scratch (again).

If you can recommend a way to duplicate my app so I can start again but without having to rebuild the backend, please share it and I'll go this way.

There are big frustrations as I face "stupid" issues while being very close to launching.
This is one. Last week I had to rebuild the whole stack upon deploy as well.
But still I really enjoy amplify and when it goes well it's great.
It's really good to see all the progress made in a year!
Thank you all for all the good work 🙏

@UnleashedMind UnleashedMind added amplify-console hosting Issues tied to hosting category pending-triage Issue is pending triage documentation Add or update documentation labels Jul 15, 2020
@abhi7cr
Copy link
Contributor

abhi7cr commented Jul 15, 2020

Hi @charleslouis,

When an amplify backend is configured with social credentials (client id and secrets), the credentials need to be supplied as environment variables in Amplify Console, in order for the CLI pull command to succeed. We released this fix last week in order for the builds to succeed consistently (previously it was only succeeding the first time) when social creds are enabled in the auth category. You can check this comment to see how to add the env variables, and this comment to see what the fix entails.

Let me know if you have any questions.

@UnleashedMind UnleashedMind added the pending-response Issue is pending response from the issue author label Jul 15, 2020
@charleslouis
Copy link
Author

charleslouis commented Jul 17, 2020

Hi @abhi7cr,

Great that the fix has been released already and thanks for following promptly.
I can confirm this issue is gone 👌

On another note :

  • I had to nvm use $VERSION_NODE_12 to my build settings to fix a memory leak upon build with yarn
    It worked.

I now I face ResourceNotReady: Resource is not in the state stackUpdateComplete.

Any reco is welcome 🙏

@charleslouis
Copy link
Author

Update:

I proceeded to backup the tables and remove / add back GraphQL API.
The build passes now.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Add or update documentation hosting Issues tied to hosting category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants