Skip to content

Console error shows on login Invalid prop ....role of value user supplied to AvatarWithIndicator, expected one of [“admin”] #12920

Closed

Description

@flodnv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Launch the app

Expected Result:

Not seeing this console error

Actual Result:

Seeing the console error

Workaround:

Does not seem to affect anything

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1669099212581009

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 22, 2022
  2. self-assigned this
    on Nov 22, 2022
  3. melvin-bot commented on Nov 22, 2022

    @melvin-bot

    Triggered auto assignment to @davidcardoza (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  4. hungvu193 commented on Nov 22, 2022

    @hungvu193
    Contributor

    Proposal
    Since we have new role "user" in policies object inside AvatarWithIndicator.js this warning happened.
    Screen Shot 2022-11-22 at 19 27 28
    Solution
    To avoid this warning, we can update the AvatarWithIndicator PropTypes by adding new role "user" inside CONST.js.

    App/src/CONST.js

    Lines 690 to 692 in 6fc1793

    ROLE: {
    ADMIN: 'admin',
    },

        POLICY: {
            TYPE: {
                FREE: 'free',
                PERSONAL: 'personal',
                CORPORATE: 'corporate',
                TEAM: 'team',
            },
            ROLE: {
                ADMIN: 'admin',
    +           USER: 'user',
            },
            ROOM_PREFIX: '#',
            CUSTOM_UNIT_RATE_BASE_OFFSET: 100,
            OWNER_EMAIL_FAKE: '_FAKE_',
        },
  5. flodnv commented on Nov 22, 2022

    @flodnv
    ContributorAuthor

    Thanks @hungvu193 but this GH does not have the 'Help wanted' label. It was my plan to do this, but another reason I also took it is because we also need another role in there (or else we'll be fixing the same "bug" in a few months).

  6. davidcardoza commented on Nov 23, 2022

    @davidcardoza
    Contributor

    @flodnv This is what I see when I launch NewDot on web and open the console. Let me know if I am missing a step here, my error doesn't match with the error message in the linked Slack thread.

    image

  7. flodnv commented on Nov 23, 2022

    @flodnv
    ContributorAuthor

    @davidcardoza this stumped me for a bit. The logged in user has to be a part of another policy as a user (not admin)

  8. dhairyasenjaliya commented on Nov 30, 2022

    @dhairyasenjaliya
    Contributor

    Hello @flodnv upwork job for bug reporting missing

  9. flodnv commented on Nov 30, 2022

    @flodnv
    ContributorAuthor

    Thanks for the bump, can you handle this @davidcardoza please?

  10. reopened this on Nov 30, 2022
  11. davidcardoza commented on Dec 1, 2022

    @davidcardoza
    Contributor

    Job posted - https://www.upwork.com/jobs/~01fed2b4c2608f0a4f
    Waiting for proposals.

  12. devr097 commented on Dec 1, 2022

    @devr097

    Hi @flodnv
    I am interested in this error,
    How did you get this error, web building or mobile app?
    I can fix this error.

  13. dhairyasenjaliya commented on Dec 2, 2022

    @dhairyasenjaliya
    Contributor

    Applied @davidcardoza bug is already fixed internally just need to settle reporting bonus

  14. flodnv commented on Dec 2, 2022

    @flodnv
    ContributorAuthor

    Yes, this bug is fixed @davidcardoza .... we just need to pay @dhairyasenjaliya for reporting

  15. davidcardoza commented on Dec 2, 2022

    @davidcardoza
    Contributor

    Contract extend @dhairyasenjaliya please accept and I will process payment.

  16. dhairyasenjaliya commented on Dec 3, 2022

    @dhairyasenjaliya
    Contributor

    Accepted @davidcardoza

  17. flodnv commented on Dec 5, 2022

    @flodnv
    ContributorAuthor

    Can we close this @davidcardoza ?

  18. davidcardoza commented on Dec 7, 2022

    @davidcardoza
    Contributor

    Yeah, payment sent. Sorry for the delay I was OOO for a conference.

  19. dhairyasenjaliya commented on Dec 8, 2022

    @dhairyasenjaliya
    Contributor

    Received and also please close the upwork contract @davidcardoza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions