App: Investigate which react-native-onyx package caused the deploy blocker

We received this deploy blocked recently. To fix it we reverted the react-native-onyx package here

We need to investigate which PR in that repo caused the problem. I suspect its this one but i haven’t confirmed.

Either way, some next steps are,

  1. Revert that PR and bump up the react-native-onyx version. Or,
  2. Improve that PR and then bump up the react-native-onyx version.

cc @rory, @marcaaron & @Szymon20000 since i see you guys have updated react-native-onyx most recently.

Action Performed:

  1. In NewDot pull in version 1.0.24.
  2. Run npm i. If react-native-onyx version didn’t update in node-modules then delete the folder and rerun npm i.
  3. Log into any account. Get its accountID.
  4. If its a new account, then message at least two people so that you have some chats on LHN.
  5. In psysh run,
use Expensify\Onyx;
use Expensify\OnyxKeys;
Onyx::pushUpdatesToClients([<accountID>], [["onyxMethod" => "mergecollection","key" => "reportIOUs_", "value" => []]]);
  1. If you don’t have psysh it’s a bit harder to simulate. I think you need to go to settings -> workspace -> manage members and add someone you haven’t chatted with before.
  2. Click into a different tab and come back to newDot’s tab.

Expected Result:

  1. LHN should continue to look normal.

Actual Result:

  1. LHN chats are either empty or show very few of them.

Workaround:

User has to refresh to see their chats.

Platform:

Where is this issue occurring?

  • Web QA reported it not working on android earlier. I’m unsure and haven’t tested the failure elsewhere besides web.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (16 by maintainers)

Most upvoted comments

Alright so the reproduction is:

  1. Have an account with no IOUs
  2. Be on a version of react-native-onyx after 1.0.19
  3. Invite user to workspace
  4. Verify the sidebar gets messed up

I don’t actually think there is anything wrong with Onyx though. It’s not supported to set an array as a collection so I think we should:

  • Fix the usage I found above in PHP (and other usages)
  • Start throwing an error if an empty array is provided to the Onyx method in PHP and mergeCollection() is used