Page MenuHomePhabricator

[lib] Don't insert username into UserStore when UserInfo missing
ClosedPublic

Authored by ashoat on Sep 26 2024, 12:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 4:19 PM
Unknown Object (File)
Fri, Nov 8, 3:01 AM
Unknown Object (File)
Fri, Nov 8, 3:01 AM
Unknown Object (File)
Nov 1 2024, 5:35 AM
Unknown Object (File)
Oct 26 2024, 10:04 PM
Unknown Object (File)
Oct 23 2024, 11:15 AM
Unknown Object (File)
Oct 23 2024, 11:11 AM
Unknown Object (File)
Oct 23 2024, 2:14 AM
Subscribers

Details

Summary

This addresses ENG-9373.

What's happening here:

  1. When findUserIdentities starts, there is a UserInfo for this user in the store
  2. By the time findUserIdentitiesActionTypes.success is reduced, the UserInfo is empty, so we end up inserting just the username into the store
  3. As a result, we end up passing a UserInfo without an ID to C++, which causes a crash
Test Plan

I tested the following 5 times and confirmed that it didn't cause a crash:

  1. Create a test account on iOS Simulator
  2. Create a test account on Android
  3. Send a friend request from Android to iOS (necessary to create a relationship)
  4. Delete account on Android

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/crash
Lint
No Lint Coverage
Unit
No Test Coverage