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

Gen 2 Dashboard not allowing user creation -- phone number field not showing #1505

Open
3 tasks done
ChristopherGabba opened this issue May 11, 2024 · 4 comments
Open
3 tasks done
Labels
bug Something isn't working console Issues related to Amplify console builds data-manager Issues related to console data manager page

Comments

@ChristopherGabba
Copy link

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

GraphQL API, DataStore

Amplify Version

v6

Amplify Categories

api

Backend

Amplify Gen 2 (Preview)

Environment information

# Put output below this line


Describe the bug

I am trying to create a dummy user using the ui in the dashboard and the phoneNumber field is not showing:

Screenshot 2024-05-11 at 2 35 30 PM Screenshot 2024-05-11 at 2 42 12 PM

Expected behavior

The UI should allow me to enter the phone number.

Reproduction steps

  1. Create a gen 2 app with an AWS Phone Number type as an object parameter and try to create a user with that paramter

Code Snippet

N/A - My dashboard is for a react native app

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

Safari

Mobile Browser Version

No response

Additional information and screenshots

No response

@ChristopherGabba ChristopherGabba added the pending-triage Incoming issues that need categorization label May 11, 2024
@chrisbonifacio
Copy link

Hi @ChristopherGabba are you able to inspect the outgoing network request to see if the phone number is being included? Sounds like it isn't, but just want to be sure.

Are you able to create the user from the AppSync console?

Also, please share your schema and amplify graphql client code so that we can reproduce how you are trying to create the user.

@ChristopherGabba
Copy link
Author

ChristopherGabba commented May 13, 2024

Hello @chrisbonifacio, here is my schema in my amplify/data/resource.ts:

  User: a
    .model({
      id: a.id().required(),
      birthdate: a.string().required(),
      firstName: a.string().required(),
      lastName: a.string().required(),
      username: a.string().required(),
      phoneNumber: a.phone().required(), // this is the one not showing up, I could make it a a.string().required() and it will work
      pushToken: a.string(),
      profileImage: a.url(),
      profileImageBlurhash: a.string(),
      searchTerm: a.string().required(),
    })
    .secondaryIndexes((index) => [
      index("phoneNumber").queryField("listUsersByPhoneNumber"),
      index("searchTerm").queryField("listUsersBySearchTerm").sortKeys(["id"]),
    ])
    .authorization((allow) => [allow.owner(), allow.publicApiKey().to(["read"])]),

I can successfully create a user directly in DynamoDB portal, via AppSync, and via graphQL api in the app, but I am primarily referencing this as a UI creation issue in the Amplify console. So it's not necessarily a problem with the schema or dynamoDB, but an issue with the Gen 2 Amplify Console. I'm trying to create a few dummy users in the system for me to test with. The phoneNumber field is just not showing up at all as shown in the picture above.

@chrisbonifacio chrisbonifacio self-assigned this May 13, 2024
@chrisbonifacio chrisbonifacio removed the pending-triage Incoming issues that need categorization label May 13, 2024
@chrisbonifacio chrisbonifacio transferred this issue from aws-amplify/amplify-js May 13, 2024
@chrisbonifacio chrisbonifacio added transferred Issue was transferred from another Amplify repository console Issues related to Amplify console builds labels May 13, 2024
@josefaidt josefaidt added the pending-triage Incoming issues that need categorization label May 13, 2024
@ykethan
Copy link
Contributor

ykethan commented May 13, 2024

@ChristopherGabba thank you for reaching out. I was able to reproduce the issue, marking as bug.

@ykethan ykethan added bug Something isn't working data-manager Issues related to console data manager page and removed pending-triage Incoming issues that need categorization transferred Issue was transferred from another Amplify repository labels May 13, 2024
@ChristopherGabba
Copy link
Author

Thanks @ykethan, I figured it had to be. Appreciate you and @chrisbonifacio 's quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working console Issues related to Amplify console builds data-manager Issues related to console data manager page
Projects
None yet
Development

No branches or pull requests

4 participants