Closed blydewright closed 3 years ago
Hey @blydewright, I've been unable to reproduce so any additional information is appreciated.
Hi @jhockett,
@blydewright thanks for the information! I was able to reproduce and I marked the issue as a bug. The Amplify CLI is seeing that AdminUI is enabled and is expecting the new authentication method.
As a workaround until we can roll out a fix, you can use the new authentication method:
cd
to your project's root directoryamplify console
-> choose Amplify consoleamplify configure --appId <YourAmplifyAppId> --envName <AnEnvName>
, Then you should be able to create an environment like you normally would with amplify env add
. Sorry to make you jump through hoops just to get unblocked. Please let me know if you have any questions about any of the steps above.
Thanks for the workaround @jhockett :) You can also advise people to revert back to 4.36.2 - that seems to work as the admin UI feature is probably not recognised anyway. I'll keep my eye out for the fix. Also keen to see what this Admin UI is all about ;)
@jhockett no dice, A valid backend environment was not specified.
in the ui, and I get the same Failed to fetch Amplify Admin credentials init failed Error: TypeError: Cannot read property 'idToken' of undefined at Object.getAwsConfig (/Users/amlcodes/.nvm/versions/node/v15.3.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/configuration-manager.js:761:13)
error still when running amplify env add
@amlcodes I have the same issue with my Admin UI interface in Console. Doesn't work, busy dealing with support on this. Have a feeling it isn't ready for use yet ;)
I reverted back to 4.36.2 so that CLI works for now.
Unfortunately @jhockett 's workaround didn't work for me (I always get a Failed to communnicate with the Amplify CLI.
error in the Amplify Console). (BTW: that typo in the error message (commuNNicate) really is there and might need fixing as well)
But revering to 4.36.2 solved it.
Same issue here
Hello, could someone please explain how to revert to 4.36.2? I have 4.38.2, and I am having a similar problem while calling "amplify init".
Thanks
@antoniogiurini npm install -g @aws-amplify/cli@4.38.2
@jhockett As you told me, I added the token, and amplify env add is now possible. Thank you.
Mac OS Big Sur Node Version v15.2.0 @aws-amplify/cli@4.38.2
Thanks @kaustavghosh06 My issue was solved by reverting to 4.36.2
Will try to finish the basic tutorial: https://aws.amazon.com/it/getting-started/hands-on/build-react-app-amplify-graphql/
npm remove -g @aws-amplify/cli
npm install -g @aws-amplify/cli@4.36.2
If you already ran amplify configure you don't need to again
amplify init --appId your-app-id
Worked for me
oh I also went to ~/.aws/ and removed some useless profiles I made during my initial failed setup, in both the config and credentials file, and I set the [default] credentials to those that I set up with my amplify configure
I believe the new CLI version 4.40.0 should address this issue but haven't tested yet :)
See changelog here: https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-cli/CHANGELOG.md
I believe the new CLI version 4.40.0 should address this issue
Usage of 4.40.0 doesn't help for me. Same error happen when I'm trying to initialize a new project by amplify init
Rolling back to 4.36.2 helps to solve the problem.
I believe the new CLI version 4.40.0 should address this issue but haven't tested yet :)
See changelog here: https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-cli/CHANGELOG.md
Sorry for any confusion, but the fix for this issue is still in progress.
I heard the same issue from a developer and am sharing what I found. In short, admin's config has a different appId
with project's appId
in some cases so that admin-helper's getRefreshedTokens
returns undefined within amplify-provider-awscloudformation
package. As work-around, the developer could add env by disabling adming ui that they doesn't use.
Stack trace:
amplify/team-provider-info.json
https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-provider-awscloudformation/src/configuration-manager.ts#L717~/.amplify/admin/config.json
and check with project's appId https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-provider-awscloudformation/src/configuration-manager.ts#L718A few options in my mind so far:
utils/resolveAppId
supports adminAppId
appId
I believe the new CLI version 4.40.0 should address this issue but haven't tested yet :) See changelog here: https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-cli/CHANGELOG.md
Sorry for any confusion, but the fix for this issue is still in progress.
Not fixed in: 4.40.1
I am running the latest CLI 4.40.1
without any issues. But I did disable the new Admin UI either before or after downgrading to 4.36.2, running a successful init
or pull
on that older version, before then upgrading back to the latest CLI.
I've tried to set up this 'simple' react app 3x's already. This is incredibly complicated. Also, your GraphQL code in the later steps is mixed up...you have it as a TODO and as a NOTETAKER.
by disabling the admin ui for all backend environments, I was able to get around this error. v:4.41.0
@jhockett, the workaround you mentioned worked for me to get temporary credentials and to start using amplify env add
. But, in my original environment, I used existing cognito user pool with the command amplify import auth
. When adding a new environment, the temporary credential created using the workaround you mentioned was not allowed to access the cognito user pool. It gave the following error:
AccessDeniedException: User: arn:aws:sts__assumed-role/ap-southeast-1__Full-access/amplifyadmin is not authorized to perform: cognito-idp:DescribeUserPool on resource: arn:aws:cognito-idp:ap-southeast-1:___:userpool/ap-southeast-1__
Is there a way to add cognito permissions to sts assumed-role?
As a workaround until we can roll out a fix, you can use the new authentication method:
cd to your project's root directory amplify console -> choose Amplify console from the side bar click on "Admin UI management" send yourself an invite and select "Full access" run amplify configure --appId
--envName , login with the temporary credentials that were sent to the email address you picked above click "yes" in the browser when it asks to authenticate with the Amplify CLI Then you should be able to create an environment like you normally would with amplify env add. Sorry to make you jump through hoops just to get unblocked. Please let me know if you have any questions about any of the steps above.
Hi @sithu951. That's a bug. I don't have a workaround for the moment, but I should have a fix for that in the Amplify CLI soon.
Hey, I have a kind of different issue, When I am trying to create a new env, it's written to me that Cognito pool is not existing '...CognitoId' When I disable the admin UI it's working.
I saw a Cognito pool in the Cognito. and it has users. (that the admin UI created) and the user I created.
But still seems not to work.
btw, for me, disabling the admin UI solved the problem
Experiencing this in 4.41.2
I have the same issue
When I click disable the Admin UI I get the following message:
Do you want to turn off the Admin UI? This will not delete your backend environment resources. This action canot be undone.
What does it mean as "the action cannot be undone", does it mean I can't enable it back when this issue is fixed? Is it safe to disable it?
I have the same issue
When I click disable the Admin UI I get the following message:
Do you want to turn off the Admin UI? This will not delete your backend environment resources. This action canot be undone.
What does it mean as "the action cannot be undone", does it mean I can't enable it back when this issue is fixed? Is it safe to disable it?
@dcfranca was it safe?
I have the same issue When I click disable the Admin UI I get the following message: Do you want to turn off the Admin UI? This will not delete your backend environment resources. This action canot be undone. What does it mean as "the action cannot be undone", does it mean I can't enable it back when this issue is fixed? Is it safe to disable it?
@dcfranca was it safe?
haven't continued lol
@dcfranca @igorimgn I tried to set up admin UI again and at first I got " This app is not valid or was deleted."
BUT when I refreshed the amplify console and clicked the Open admin UI it worked (in my case, some things like content management never worked)
@mikelhamer
Experiencing this in 4.41.2
Same here (reporting for visibility).
Confirm that turning off the admin UI fixes the issue.
I have this issue as well with version 4.41.2. I reverted back to version 4.36.2, but now I have this error:
File project: data should NOT have additional properties: 'frontend-ios'
Hi all! We just released version 4.42.0 of the Amplify CLI. After upgrading, you should now be appropriately asked which authentication method you want to use even if the Admin UI is enabled.
Same issue still happend, while I am in 4.42.0 so it's not working! @jhockett
@iuyt9003 can you provide more context? What command did you use? Do you still see the error if you upgrade to the latest version of Amplify CLI?
Describe the bug I updated my CLI from 4.36.2 to 4.37.0 and ran
amplify env add
to create a new environment. It threw an error:amplify Cannot read property 'idToken' of undefined
. When reverting back to 4.36.2, the same command worked.Amplify CLI Version 4.37.0
To Reproduce Attempt to run
amplify env add
to a new environment name ("N" to would you like to use an existing env)Expected behavior It shouldn't throw an error.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Mac OS Big Sur
node -v
to check the node version on your system v12.16.3Additional context Add any other context about the problem here.