Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.79k forks source link

Console error when spliting bills among new users with no chat history #24243

Closed kavimuru closed 1 year ago

kavimuru commented 1 year ago

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:

  1. Open the website
  2. click + icon from LHN
  3. create a group for new users
  4. split a bill for the group

    Expected Result:

    there shouldn't be a console log error

    Actual Result:

    Uncaught TypeError: Iterable yielded undefined which is not a string

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.51-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/43996225/824645ed-c56a-48f4-87ea-419d506e741e

https://github.com/Expensify/App/assets/43996225/ca73853e-cebf-484f-996b-90520edad95b

Expensify/Expensify Issue URL: Issue reported by: @misgana96 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690936933055849

View all open jobs on GitHub

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

ygshbht commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

The console logs an error when splitting bills among new users with whom you have no chat history.

What is the root cause of that problem?

The error occurs when attempting to split a bill with users whose data is unavailable due to privacy reasons related to the absence of previous chat interactions. This issue becomes evident when formatting participants and finding the 'login' is undefined. https://github.com/Expensify/App/blob/2ce4328401ec71f9ec0dc1304e0c5be261ae5628/src/libs/actions/IOU.js#L475

What changes do you think we should make in order to solve the problem?

When invoking Localize.arrayToString([currentUserLogin, ..._.map(participants, (participant) => participant.login)]), if login is undefined, use the user's email or phone as an alternative by finding it in the participant object or asking the requesting user, if the server permits. If not possible, introduce a UI component to display an error to the user.

bernhardoj commented 1 year ago

Dupe of https://github.com/Expensify/App/issues/21268

pbkompasz commented 1 year ago

Dupe of #23470

slafortune commented 1 year ago

Closing