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

Error updating auth to migrate resources to the latest amplify version #12784

Closed
ZalgirisKaunas opened this issue Jun 13, 2023 · 13 comments
Closed
Labels
auth Issues tied to the auth category of the CLI migration-issue Issues tied to migration of the project between major CLI versions pending-triage Issue is pending triage question General question

Comments

@ZalgirisKaunas
Copy link

Amplify CLI Version

12.0.3

Question

Couldn't push new API endpoint via cli because error: "Auth triggers have been configured using an older version of the CLI and must be migrated before they can be deployed."

I then tried to do auth update but after that I still couldn't push the code and was getting Error updating the Cognito trigger: The "path" argument must be of type string. Received undefined.

not sure what should I do next

@ZalgirisKaunas ZalgirisKaunas added pending-triage Issue is pending triage question General question labels Jun 13, 2023
@ykethan
Copy link
Member

ykethan commented Jun 13, 2023

Hey @ZalgirisKaunas, thank you for reaching out.The issue appears to have a similar message as #12433.
Could you provide us some additional information on the version of Amplify CLI that was utilized before?
Could you provide us some minimal steps that would assist us in reproducing this behaviour. Additionally, could you let us know the current amplify status output.

@ykethan ykethan added auth Issues tied to the auth category of the CLI migration-issue Issues tied to migration of the project between major CLI versions pending-response Issue is pending response from the issue author labels Jun 13, 2023
@ZalgirisKaunas
Copy link
Author

ZalgirisKaunas commented Jun 13, 2023

The first time I created that API resource my aws-amplify version was 3.3.3, I'm not sure about cli version because I updated it several times after that and because of that I'm not sure how to reproduce the issue.

My amplify status:

image
image

one auth resource is for my userpool and another for user pool groups

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Jun 13, 2023
@ZalgirisKaunas
Copy link
Author

ZalgirisKaunas commented Jun 14, 2023

I pulled the restored environment so I continue where I left it without that new endpoint. but I still get � Auth triggers have been configured using an older version of the CLI and must be migrated before they can be deployed.
Even when I do changes to resources that worked fine just a few days ago.

I'm wondering would it work if i remove auth triggers via console or in cloudformation

@ykethan
Copy link
Member

ykethan commented Jun 14, 2023

Hey @ZalgirisKaunas, It is currently not recommended to modify Amplify managed resources in the AWS console as this may cause a drift between the resource. Expected if the auth resource was imported into the project.

Could you try running amplify update auth, select Walkthrough all the auth configurations and run through the flow while keeping the previous changes such as the auth triggers previously added. Could you then run amplify push --debug and let us know if the auth resource throws an error.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Jun 14, 2023
@thathypeapp
Copy link

Hi having trouble with this also but don't quite understand the issue. Its been a while since I've touched my amplify app (2022). I tried to make some changes today but I'm running into an issue where the CLI says I have to upgrade the auth. When I try to update it, it removes a bunch of files and then on amplify push, I get this error in my stack. Existing schema attributes cannot be modified or deleted. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: null; Proxy: null)

@g33kracc00n
Copy link

hello
I have the same issue, I had Amplify CLI version 7.6.15 with node version of 12

I upgraded to node 16, but I had errors while pushing regarding the function UpdateRolesWithIDPFunction because the node version was persistent on 12.

so I read in on the related issues that I need to upgrade my amplify cli (to have a higher node version of UpdateRolesWithIDPFunction), therefore I updated amplify cli to 12.2.1
then, when running amplify push, I got the following error "Auth triggers have been configured using an older version of the CLI and must be migrated before they can be deployed"

I ran amplify auth update, and went through "Walkthrough all the auth configurations" and "Apply default configuration with Social Provider (Federation)" options, and for both them, after finishing the steps I'm getting the following error "Error updating the Cognito trigger: The "path" argument must be of type string. Received undefined"

@g33kracc00n
Copy link

And when pushing to the cloud I get this error as well Existing schema attributes cannot be modified or deleted. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException;

@josefaidt
Copy link
Contributor

Hey @g33kracc00n @thathypeapp please be sure to port modifications to user attributes (i.e. custom attributes) by using auth overrides after migrating the resource with amplify update auth

@josefaidt
Copy link
Contributor

Hey @g33kracc00n @thathypeapp just wanted to follow-up here and see if you're still experiencing this?

@g33kracc00n
Copy link

@josefaidt Hey, I tried the auth overrides but it didn't work I had to create new environment and migrate everything manually

@ZalgirisKaunas
Copy link
Author

ZalgirisKaunas commented Nov 7, 2023

I fixed my issues manually in the cloudformation templates via console

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 7, 2023
@ykethan
Copy link
Member

ykethan commented Nov 7, 2023

thank you for the confirmation, glad to hear that you were able to mitigate the issue.
Closing the GitHub issue. Please feel free in reaching out to us again.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
Copy link

github-actions bot commented Nov 7, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues tied to the auth category of the CLI migration-issue Issues tied to migration of the project between major CLI versions pending-triage Issue is pending triage question General question
Projects
None yet
Development

No branches or pull requests

5 participants