aws-amplify / amplify-studio

AWS Amplify Studio (Formerly Admin UI)
135 stars 31 forks source link

Amplify Admin UI App Content stuck on "Fetching items" #41

Closed dcfranca closed 3 years ago

dcfranca commented 3 years ago

Describe the bug When I open the new Amplify Admin UI on the console I can go to the user management section, to Authentication, to GraphQL API, and so on... All of them are loading fine. However, the Content never leaves the state of "Fetching items", I had let it run for several minutes, no signal of finishing load the items, neither an error message is displayed.

To Reproduce Steps to reproduce the behavior:

  1. Go to Amplify Admin UI
  2. Click on Content on the left sidebar
  3. Wait forever for the fetching items to finish
  4. No way to select a table on the drop-down menu at the top, it is disabled.

Expected behavior It should finish loading the data related to the app content or show a clear error message

Screenshots https://imgur.com/fExsOBl

Desktop (please complete the following information):

JuanmanDev commented 3 years ago

Hello! Seems same problem here: image image image

Desktop (please complete the following information):

OS: Windows 10 Browser Chrome Versión 87.0.4280.88 (Build oficial) (64 bits)

zzZCodeZzz commented 3 years ago

Same here

valerii15298 commented 3 years ago

Same problem for me!

jamesonwilliams commented 3 years ago

Looks to be a duplicate of #12, possibly #7.

marketlync-asharma commented 3 years ago

Same here

ben-u commented 3 years ago

I was having similar issues which were caused by non-nullable fields automatically added to my schema. (I set up my types via Admin UI > Data modeling)

Solved it by going to AppSync > Schema and making _version, _lastChangedAt, createdAt, and updatedAt nullable by removing "!" from the type definitions.

After saving and exporting as schema.json, I copied this to src/graphql/schema.json in my repo so the changes wouldn't be overridden the next time I pushed a change via the CLI.

All my data from DynamoDB was then loaded on the Admin UI > Content page as expected..

It seems like in my case the errors were due to loading data directly into DynamoDB using a CSV import script, rather than adding data via the frontend app using the AWSAppSyncClient / DataStore.save / API.graphql which may have added these extra fields automatically? Just guessing^^''

Update: Can confirm the following fields are added to your DynamoDB items when adding data via the Admin UI Content page (rather than making these nullable, it's probably best to make sure every item in your table includes them:

__typename (String) e.g. Artwork _lastChangedAt (Number) e.g. 1610088672990 _version (Number) e.g. 1 createdAt (String) e.g. 2021-01-08T06:51:12.963Z updatedAt (String) e.g. 2021-01-08T06:51:12.963Z

Additionally if you have relationship fields (e.g. 1:1 with Location type), rather than having: location (String) e.g. 027d27e0-5f1d-4fad-b059-d81d504dba38

you should instead have: artworkLocationId (String) e.g. 027d27e0-5f1d-4fad-b059-d81d504dba38

kaman1 commented 3 years ago

I have the same problem

ssergienko commented 3 years ago

same issue

swaminator commented 3 years ago

@kaman1 @ssergienko @ben-u @valerii15298 could you please give it a shot again? We released several improvements.

FrankHuxol commented 3 years ago

It is still not working for me. However, the behaviour changed a bit for me. Previously, the GUI was just showing "Fetching Items" and never returned. Now I am at least getting a response: There was an error loading your data. Content capabilities are still in beta. We’d love to address this issue. Please provide your console log and other details here.

Within my console, this is logged:

POSThttps://pinpoint.us-west-2.amazonaws.com/v1/apps/f9ce7bb3b200426780628ae86610350e/events/legacy?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20210303T135956Z&X-Amz-Security-Token=...&X-Amz-SignedHeaders=host&X-Amz-Signature=... [HTTP/2 404 Not Found 362ms] i18next: languageChanged de i18next: initialized Object { debug: true, initImmediate: true, ns: (1) […], defaultNS: (1) […], fallbackLng: (1) […], fallbackNS: false, whitelist: false, nonExplicitWhitelist: false, supportedLngs: false, nonExplicitSupportedLngs: false, … } i18next::translator: key "schemaDesign.inputError.empty" for languages "de, en" won't get resolved as namespace "translation" was not yet loaded This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!! [AwsUi] [awsui-select] TheselectedIdproperty has been deprecated. UseselectedOptioninstead. Object { aws_project_region: "eu-central-1", aws_cognito_identity_pool_id: "eu-central-1:...", aws_cognito_region: "eu-central-1", aws_user_pools_id: "eu-central-1_...", aws_user_pools_web_client_id: "...", aws_appsync_graphqlEndpoint: "https://wektamphc5epfospca6kxvybpu.appsync-api.eu-central-1.amazonaws.com/graphql", aws_appsync_region: "eu-central-1", aws_appsync_authenticationType: "AWS_IAM" } appsync storageSubscribed undefined appsync networkStatus Object { active: true } appsync outboxStatus Object { isEmpty: true } [WARN] 00:01.72 DataStore - subscriptionError Connection failed: com.amazonaws.deepdish.graphql.auth#UnauthorizedException [WARN] 00:01.75 DataStore - Sync error Connection failed: com.amazonaws.deepdish.graphql.auth#UnauthorizedException

Interesting fact though: A month ago or so I just deployed the datamodel from the admin UI without any changes. Afterwards, retrieving content in the admin UI worked for a few days.

hsspain commented 3 years ago

This issue should now be resolved. I am going to close this ticket, but feel free to re-open if you continue to encounter issues.

Anthony-333 commented 1 year ago

experiencing this too! any tips to fix?

abhi7cr commented 1 year ago

Hi @Anthony-333, by any chance do you have 2 tabs of Content opened in the same browser ? Content only works in one tab. https://docs.amplify.aws/console/data/content-management/#multi-tab-limitation

Anthony-333 commented 1 year ago

I see that is my mistake I tried to close the other one then it works thanks!

charafsalmi commented 1 year ago

I have the same issue. Doesn't seem to be related to the multitab situation. I got only one tab opened. Nothing changes after login / logout. No error message, just an infinite fetching item label... Can this be more explicit so that we have other ideas to try on our end?

stephenjen commented 1 year ago

I have the same issue and have tried closing all tabs, closing browser, switching browser.

Update: I switched to Amplify Studio and was able to view table content under Manage > Content, but first I had to add IAM as an additional auth type, here https://docs.amplify.aws/console/data/content-management/#iam-required-as-auth-provider

The AWS console still doesn't work for me.

codenamegary commented 1 year ago

Hi @Anthony-333, by any chance do you have 2 tabs of Content opened in the same browser ? Content only works in one tab. https://docs.amplify.aws/console/data/content-management/#multi-tab-limitation

Life saver. Thank you! I can't believe how long I struggled with this lol.