Page MenuHomePhabricator

[native] Remove dangling device after QR auth failure
ClosedPublic

Authored by bartek on Mar 6 2025, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 4, 5:35 PM
Unknown Object (File)
Fri, Apr 4, 4:05 PM
Unknown Object (File)
Fri, Apr 4, 1:20 PM
Unknown Object (File)
Tue, Apr 1, 8:50 PM
Unknown Object (File)
Sat, Mar 29, 4:16 PM
Unknown Object (File)
Tue, Mar 25, 6:16 AM
Unknown Object (File)
Thu, Mar 20, 12:11 AM
Unknown Object (File)
Wed, Mar 19, 11:46 AM
Subscribers

Details

Summary

Address ENG-10309.
Try reverting device list update after the process failed at a later point.

Test Plan
  1. Replaced await sendDeviceListUpdateSuccessMessage() with throw new Error('foo')
  2. After alert is shown, verified that:
    • No new device is present on the Linked Devices screen
    • Checked DynamoDB - two device list updates are present: the first update added a new device and the second update removed it. Before this diff, only the former update was present, resulting in dangling device on the list.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Mar 6 2025, 1:26 AM
bartek added inline comments.
native/account/qr-auth/primary-device-qr-auth-context-provider.js
196–199

Perhaps I should wrap it with ignorePromiseRejections? Just in case this call fails too

ashoat added inline comments.
native/account/qr-auth/primary-device-qr-auth-context-provider.js
196–199

Doesn’t hurt

This revision is now accepted and ready to land.Mar 6 2025, 8:10 AM

Wrap in ignorePromiseRejections

This revision was landed with ongoing or failed builds.Mar 14 2025, 1:58 AM
This revision was automatically updated to reflect the committed changes.