amplify-studio
amplify-studio copied to clipboard
Amplify Admin UI show credential error
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
d3ja25qdvvobwd
Region
us-west-2
Amplify Console feature
Environment variables
Describe the bug
Tried to open admin ui console from cli/link from amplify console, the error showed: An error occurred while fetching the app backend: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
Expected behavior
Show admin ui
Reproduction steps
Either from amplify console or click on link in the amplify console
Build Settings
No response
Additional information
No response
Tried many options. Finally it showed me login page so I can use the invited user to get in.
Hi :wave:, thanks for raising. I'm going to transfer to the Admin UI repo to get some more eyes on it.
Thank you for reaching out. We are looking at this issue now.
Why closed? any solution now?
Fixed this issue by disable and re-enable Amplify studio
I just ran into the same issue. I enabled Amplify Studio for the first time and invited one of my email addresses, granting "Full access".
I received the invitation email, clicked the link and was prompted for email, temporary password and new password. Then it showed an initial screen. I selected the option to manage models (I forget the exact name). Then a blank screen loaded with the following message:
An error occurred while fetching the app backend: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
In case it matters, my web browser is Chrome 99.0.4844.51
and I'm on MacOS 12.2.1
.
@clintfoster are you using Studio with an existing app or a new one?
@clintfoster what is your app ID and region?
@swaminator It's an existing app that I re-created from scratch recently (via the CLI) while working around another issue. I can create it again in Amplify Studio if it will provide a benefit like avoiding legacy baggage brought over from the CLI (if any). However, my schemas are in separate files, and I don't think AS supports that yet, per my comment in aws-amplify/amplify-adminui#317 about Setup -> Data not showing my schemas.
@yppartyk The appId is d1o4lgqajf4ob6
in us-west-2
.
I've also confirmed a workaround - you can go to you Amplify console, visit the "App Settings: Amplify Studio settings" page, and disable and re-enable the "Enable Amplify Studio" toggle.
See related: https://github.com/aws-amplify/amplify-adminui/issues/580
Actually taking another look over this ticket, there may be something different might be going on here. Is this consistently reproducible for you @clintfoster? I haven't been able to reproduce it without manually mucking with my Cognito resources.
@johnpc I haven't tried Amplify Studio in quite some time. We use the CLI, except for managing connected branches, which we've been doing via the standard Amplify Admin console (since it seems to be the only way to share one backend between multiple frontends since you can't run amplify add hosting
as you would with a single BE & FE in one project).
I tried Amplify Studio again just now as a test: From the standard Amplify console there is a "Launch Studio" button that I clicked (which is the scenario in the original reporter's description). It correctly launched Amplify Studio with an account icon in the upper right indicating I was signed in as an admin. As I recall, the account is actually client token-based (using Cognito under the covers) unlike the other consoles that use IAM credentials. Anyway, it apparently worked for the client account I set up some time ago. I did not get a blank screen and I did not have to explicitly login again.
I did not try to repro the scenario that I reported as a comment in this issue, which was during initial client signup when I clicked the email link and entered my temporary & new passwords, at which time I got a blank screen.
I have a recollection that sometimes the CLI will launch Amplify Studio (or some other browser app) for commands that I must not use very often. I think I may have seen the blank screen problem in that scenario too (possibly cleared by refreshing). I guess it is doing some kind of dance to pass a client token to the CLI.
@johnpc The workaround of disabling and re-enabling amplify studio doesn't seem to work anymore. I tried it multiple times and even tried creating a new amplify project. One of my project's region is ap-southeast-1
and the appId is d1ns89ylf85fwv
. Not sure what's wrong but thank you for your help :)
Fixed this issue by disable and re-enable Amplify studio
I came to this post because I cleaned up my Cognito's Identity Pools and User Pools, by re-enabling Amplify Studio it is restored, thank you!
To help all the fellow developers stumbling onto this.
Disabling and enabling Amplify Studio was not the culprit for me. As years had passed, I always forgot how and where to manage the users correctly, when the customer asked for help. I naively thought, that Amplify is just a facade for Cognito.
TLDR: Do not manage your Amplify Backend users from Cognito. Manage the users from the correct place.
Amplify > All apps > [Your app] > Backend environments > Manage environments > Amplify Studio settings > Access Control settings > Invite users
Using Cognito to manage the backend users will result in that weird environment error: AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1