Skip to content

[HOLD for payment 2024-06-13] [HOLD for payment 2024-06-11] [$250] Tags - Console error when disabling tag when created offline on web, app crashes on iOS #42885

Description

@kavimuru

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


Version Number: 1.4.78-2
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: exp around https://expensify.testrail.io/index.php?/tests/view/4587396&group_by=cases:section_id&group_order=asc&group_id=296081
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go offline.
  3. Create a new workspace.
  4. Go to workspace settings > More features.
  5. Enable Tags.
  6. Go to Tags.
  7. Add a tag.
  8. Click on the tag.
  9. Disable the tag.

Expected Result:

Tag can be disabled.

Actual Result:

Tag cannot disabled. Console error shows up on web. App crashes on iOS.

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6496889_1717113061649.crash_iOS.mp4
Bug6496889_1717113061645.tag_offline.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01788b9ab12b2eb04a
  • Upwork Job ID: 1797634804417064960
  • Last Price Increase: 2024-06-03
  • Automatic offers:
    • GandalfGwaihir | Contributor | 102575766
    • tienifr | Contributor | 102577178
Issue OwnerCurrent Issue Owner: @bfitzexpensify

Activity

added
DeployBlockerCashThis issue or pull request should block deployment
BugSomething is broken. Auto assigns a BugZero manager.
DeployBlockerIndicates it should block deploying the API
on May 31, 2024

melvin-bot commented on May 31, 2024

@melvin-bot

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot commented on May 31, 2024

@melvin-bot

Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions commented on May 31, 2024

@github-actions
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

kavimuru commented on May 31, 2024

@kavimuru
Author

@bfitzexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

kavimuru commented on May 31, 2024

@kavimuru
Author

We think this bug might be related to #wave-collect - Release 1

Nodebrute commented on May 31, 2024

@Nodebrute
Contributor

Proposal

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

Console error when disabling tag when created offline on web, app crashes on iOS

What is the root cause of that problem?

When we enable tags offline, PolicyTag.orderWeight will be undefined because this data is returned by the backend. Passing this undefined value will cause a console error to appear

setWorkspaceTagEnabled(route.params.policyID, {[currentPolicyTag.name]: {name: currentPolicyTag.name, enabled: value}}, policyTag.orderWeight);

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

Instead of using PolicyTag.orderWeight we can use route.params.orderWeight here

setWorkspaceTagEnabled(route.params.policyID, {[currentPolicyTag.name]: {name: currentPolicyTag.name, enabled: value}}, policyTag.orderWeight);

Just like we are using in WorkspaceViewTagsPage.tsx

Tag.setWorkspaceTagEnabled(policyID, tagsToDisable, route.params.orderWeight);

We can also do it like this policyTag.orderWeight ?? route.params.orderWeight
Let's check other places where we have this issue and fix it

What alternative solutions did you explore? (Optional)

We can optimistically set this orderWeight. Or we can use 0

Tag.setWorkspaceTagEnabled(policyID, tagsToDisable, 0);

63 remaining items

melvin-bot commented on Jun 13, 2024

@melvin-bot

@Gonals, @mountiny, @bfitzexpensify, @allgandalf, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

bfitzexpensify commented on Jun 14, 2024

@bfitzexpensify
Contributor

Payments complete.

@allgandalf, please complete the BZ checklist - thank you!

allgandalf commented on Jun 14, 2024

@allgandalf
Contributor

@bfitzexpensify , Another PR fixed this issue (Also i was not the C+ on that PR), do we still need a checklist here? LMK if yes, will provide over here :) thanks

melvin-bot commented on Jun 17, 2024

@melvin-bot

@Gonals, @mountiny, @bfitzexpensify, @allgandalf, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

bfitzexpensify commented on Jun 18, 2024

@bfitzexpensify
Contributor

@allgandalf no then, we are all good. Closing this out.

Nodebrute commented on Jun 23, 2024

@Nodebrute
Contributor

@bfitzexpensify I haven't received payment as per this comment

bfitzexpensify commented on Jun 25, 2024

@bfitzexpensify
Contributor

@Nodebrute @allgandalf can you please share your Upwork profile links?

Nodebrute commented on Jun 25, 2024

@Nodebrute
Contributor

bfitzexpensify commented on Jun 26, 2024

@bfitzexpensify
Contributor

All paid out here, closing this out

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions