Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to sync QR code #19550

Closed
bsclifton opened this issue Nov 18, 2021 · 10 comments · Fixed by brave/brave-core#11199
Closed

Changes to sync QR code #19550

bsclifton opened this issue Nov 18, 2021 · 10 comments · Fixed by brave/brave-core#11199

Comments

@bsclifton
Copy link
Member

Description:

See https://github.com/brave/internal/issues/832

@LaurenWags
Copy link
Member

QA/Blocked until uplifted to 1.33.x

@AlexeyBarabash
Copy link
Contributor

Verified on https://github.com/brave/brave-browser/releases/tag/v1.35.1, preparing uplift to 1.33.x

@AlexeyBarabash
Copy link
Contributor

Uplift PR created brave/brave-core#11358

@LaurenWags
Copy link
Member

Removing QA/Blocked as 1.33.99 is available

@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Dec 6, 2021
@stephendonner
Copy link

stephendonner commented Dec 7, 2021

Verified PASSED using

Brave 1.33.101 Chromium: 96.0.4664.93 (Official Build) (x86_64)
Revision 17531e0a70b4f8108f2418e8b5117f465077710b-refs/branch-heads/4664@{#1229}
OS macOS Version 11.6.1 (Build 20G224)

Cross-timezone tests - PASSED

  1. set up a desktop on the Los Angeles timezone
  2. set up an Android phone on the Auckland (NZ) timezone.
  3. create a Sync chain on Desktop
  4. attempt to join the Sync chain on Android (it should WORK)
  5. reset both browser profiles.
  6. change desktop computer to the Auckland (NZ) timezone.
  7. change Android phone to the Los Angeles timezone.
  8. create Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should WORK)
  10. repeat these steps with two Android phones and no Desktop.
    1. unable to test; only have a single Android test device
  11. repeat these steps with a Desktop and an iOS phone
  12. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

example example example example
Screenshot_20211207-092300 [image missing; corrupted while uploading to GitHub. Not retesting for sake of time.] Screenshot_20211206-132103 Screenshot_20211206-132320

Desktop & iOS - PASSED

example example example example example example
Screen Shot 2021-12-06 at 3 42 35 PM Image from iOS Image from iOS (1) Screen Shot 2021-12-07 at 9 26 36 AM Image from iOS (2) Image from iOS (3)

iOS & Android - PASSED

example example example example example example
Image from iOS (1) Image from iOS (4) Screenshot_20211206-131433 Screenshot_20211206-131532 Screenshot_20211206-132103 Screenshot_20211206-132320 (1)

Normal expiration test - PASSED

  1. create a Sync chain on Desktop and keep it open until Step 6 is done.
  2. wait 20 minutes.
  3. attempt to join Sync chain on Android (it should WORK).
  4. reset Android profile.
  5. wait 11 minutes (so that it’s > 30 minutes since generating the code).
  6. attempt to join Sync chain on Android (it should FAIL)
  7. repeat these steps with two Android phones and no Desktop (NOTE: unable to test; only have a single Android test device)
  8. repeat these steps with a Desktop and an iOS phone.
  9. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

example example example
Screen Shot 2021-12-09 at 1 19 49 PM Screenshot_20211209-134110 Screenshot_20211209-135211

Desktop & iOS - PASSED

example example example
Screen Shot 2021-12-09 at 1 19 49 PM Image from iOS (2) Image from iOS (3)

iOS & Android - PASSED

Verification done over in #19550 (comment)

Code expiring too far into the future - PASSED

  1. set up a desktop computer and change the date to 1 day into the future.
  2. set up an Android phone with the correct date and time.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should FAIL)
  5. attempt to join the same Sync chain on iOS (it should FAIL)
example example example
Screen Shot 2021-12-07 at 2 41 19 PM Image from iOS Screenshot_20211206-144246

Old-style QR codes - PASSED

  1. set up a desktop computer with an earlier version of Brave (with the old-style QR codes).
  2. set up an Android phone with support for updated QR codes.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should WORK).
  5. reset both browser profiles.
  6. change time on desktop computer to January 2nd 2022.
  7. change time on Android phone to January 2nd 2022.
  8. create a Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should FAIL).
  10. repeat these steps with an iOS phone instead of an Android one.

Desktop & Android - PASSED

example example example example
Screen Shot 2021-12-06 at 5 14 35 PM Screenshot_20211206-181048 Screen Shot 2022-01-02 at 5 16 56 PM Screenshot_20220102-181334

Desktop & iOS - PASSED

example example example example
Screen Shot 2021-12-06 at 5 50 03 PM Image from iOS (7) Screen Shot 2022-01-02 at 5 53 58 PM Image from iOS (6)

Malformed QR codes (Android & desktop) - PASSED

malformed JSON unsupported version (too small) unsupported version (too recent) sync_code_hex (too short) sync_code_hex (too long) sync_code_hex (invalid hex) missing sync_code_hex missing version missing expirary
sync-code sync-code sync-code sync-code sync-code sync-code sync-code sync-code sync-code
malformed JSON unsupported version (too small) unsupported version (too recent) sync_code_hex (too short) sync_code_hex (too long) sync_code_hex (invalid hex) missing sync_code_hex missing version missing expirary
Screenshot_20211206-191820 Screenshot_20211206-191900 Screenshot_20211206-192637 Screenshot_20211206-192649 Screenshot_20211206-191921 Screenshot_20211206-191931 Screenshot_20211206-191954 Screenshot_20211206-192010 Screenshot_20211206-192708

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Dec 7, 2021
@LaurenWags
Copy link
Member

LaurenWags commented Dec 7, 2021

Verified using 1.33.100 on the below two devices for Android <--> Android tests.

Android 1 - Google Pixel (Android 11)
Android 2 - Samsung JNeo (Android 7)

Verified cases listed in doc from https://github.com/brave/internal/issues/832#issuecomment-973471650 for Android <--> Android sync.

Cross-timezone tests - PASSED
  1. Setup Android 1 on the Los Angeles timezone.
  2. Setup Android 2 on the Auckland (NZ) timezone.
  3. Create a Sync chain on Android 1.
  4. Attempt to join the Sync chain on Android 2 (it should WORK).
  5. Reset both Android profiles.
  6. Create Sync chain on Android 2.
  7. Attempt to join the Sync chain on Android 1 (it should WORK).

Confirmed able to join sync chains as expected in steps 4 and 7.

Android 1 - LA Android 2 - Auckland
1 2
Step 3 Step 4
3 4
Step 6 Step 7
5 6
Normal expiration test - PASSED
  1. Create a Sync chain on Android 1 and keep it open until Step 6 is done.
  2. Wait 20 minutes.
  3. Attempt to join Sync chain on Android 2 (it should WORK).
  4. Reset Android 2 profile.
  5. Wait 11 minutes (so that it’s > 30 minutes since generating the code).
  6. Attempt to join Sync chain on Android 2 (it should FAIL).
Step 1 Step 3 Step 6
step1 step3 step6
Code expiring too far into the future - PASSED
  1. Setup Android 1 and change the date to 1 day into the future.
  2. Setup Android 2 with the correct date and time.
  3. Create a Sync chain on Android 1.
  4. Attempt to join the Sync chain on Android 2 (it should FAIL).
Step 1 - Android 1 Step 2 - Android 2 Step 3 Step 4
step1 step2 step3 step4
Old-style QR codes - PASSED
  1. Setup Android 1 with an earlier version of Brave (with the old-style QR codes).
  2. Setup Android 2 phone with support for updated QR codes.
  3. Create a Sync chain on Android 1.
  4. Attempt to join the Sync chain on Android 2 (it should WORK).
  5. Reset both browser profiles.
  6. Change time on Android 1 to January 2nd 2022.
  7. Change time on Android 2 to January 2nd 2022.
  8. Create a Sync chain on Android 1.
  9. Attempt to join the Sync chain on Android 2 (it should FAIL).
Step 1 - Android 1 Step 2 - Android 2 Step 4 Android 1 Step 4 Android 2 Step 6 Step 7 Step 9
step1 step 2 step4 android 1 step 4 android 2 step 6 step 7 step 9

Note - Malformed QR Codes were tested on Android by @stephendonner with #19550 (comment).


Verified using 1.33 (21.12.7.21) on the below two devices for iOS <--> iOS tests.

iOS 1 - iPhone 6s Plus (iOS 15.1)
iOS 2 - iPad 5th Gen (iOS 14.8.1)

Verified cases listed in doc from https://github.com/brave/internal/issues/832#issuecomment-973471650 for iOS <--> iOS sync.

Cross-timezone tests - PASSED
  1. Setup iOS 1 on the Los Angeles timezone.
  2. Setup iOS 2 on the Auckland (NZ) timezone.
  3. Create a Sync chain on iOS 1.
  4. Attempt to join the Sync chain on iOS 2 (it should WORK).
  5. Reset both iOS profiles.
  6. Create Sync chain on iOS 2.
  7. Attempt to join the Sync chain on iOS 1 (it should WORK).

Initially to join sync chains as expected in steps 4 and 7, logged brave/brave-ios#4662.
However, restarting the device after re-setting the timezone worked and allowed the test to pass.

iOS 1 - LA iOS 2 - Auckland
ios 1 LA ios 2 Auckland
Step 3 Step 4
Step 3 Step 4
Step 6 Step 7
Step 6 Step 7
Normal expiration test - PASSED
  1. Create a Sync chain on iOS 1 and keep it open until Step 6 is done.
  2. Wait 20 minutes.
  3. Attempt to join Sync chain on iOS 2 (it should WORK).
  4. Reset iOS 2 profile.
  5. Wait 11 minutes (so that it’s > 30 minutes since generating the code).
  6. Attempt to join Sync chain on iOS 2 (it should FAIL).
Step 1 Step 3 Step 6
Step 1 Step 3 Step 6
Code expiring too far into the future - PASSED
  1. Create a Sync chain on iOS 1.
  2. Close and exit the app fully (remove from memory)
  3. Setup iOS 1 to the date to 1 day into the future. (Close settings fully/remove from memory and relaunch to confirm the time change took effect as expected)
  4. Setup iOS 2 with the correct date and time.
  5. Attempt to join the Sync chain on iOS 2 (it should FAIL).
Step 3 - iOS 1 Step 4 - iOS 2 Step 5
Step 3 Step 4 Step 5
Old-style QR codes - PASSED
  1. Setup iOS 1 with an earlier version of Brave (with the old-style QR codes).
  2. Setup iOS 2 phone with support for updated QR codes.
  3. Create a Sync chain on iOS 1.
  4. Attempt to join the Sync chain on iOS 2 (it should WORK).
  5. Reset both browser profiles.
  6. Create a Sync chain on iOS 1 using an earlier version of Brave (with the old-style QR codes). Then close and exit Brave fully, removing from memory.
  7. Install version with support for updated QR codes on iOS2 but do NOT join sync chain. Then close and exit Brave fully, removing from memory.
  8. Change time on iOS 1 to January 2nd 2022. (Close settings fully/remove from memory and relaunch to confirm the date change took effect as expected)
  9. Change time on iOS 2 to January 2nd 2022. (Close settings fully/remove from memory and relaunch to confirm the date change took effect as expected)
  10. Attempt to join the Sync chain on iOS 2 (it should FAIL).
Step 1 - iOS 1 Step 2 - iOS 2 Step 4 iOS 1 Step 4 iOS 2 Step 8 Step 9 Step 10
Step 1 Step 2 Step 4 iOS1 Step 4 iOS2 Step 8 Step 9 Step 10

Using 1.33 (21.12.8.23) with iPhone 6s Plus (iOS 15.1) for below tests:

Malformed QR codes/Malformed JSON (iOS) - PASSED

Scanned example Malformed QR Codes from spec, confirmed error message was received.

Malformed QR Code 1 Malformed QR Code 2
Malformed QR Code 1 Malformed QR Code 2
malformed JSON unsupported version (too small) unsupported version (too recent) sync_code_hex (too short) sync_code_hex (too long) sync_code_hex (invalid hex) missing sync_code_hex missing version missing expiry
Malformed JSON Unsupported version - too small Unsupported version - too new sync code hex too short sync code hex too long sync code hex not a hex string missing sync code hex missing version missing expiry
malformed JSON unsupported version (too small) unsupported version (too recent) sync_code_hex (too short) sync_code_hex (too long) sync_code_hex (invalid hex) missing sync_code_hex missing version missing expiry
Malformed Json Unsupported version - too small Unsupported version too new sync code hex too short sync code hex too long sync code hex not a hex string missing sync code hex missing version missing expiry

@stephendonner
Copy link

stephendonner commented Dec 7, 2021

Verification PASSED using

[Brave 1.33.100 Chromium: 96.0.4664.55 (Official Build) (64-bit)
Revision 38cededc5d09b785d12203f1d3209aa6eb293e79-refs/branch-heads/4664@{#1090}
OS Windows 10 Version 20H2 (Build 19042.1348)](#19550)

Cross-timezone tests - PASSED

  1. set up a desktop on the Los Angeles timezone
  2. set up an Android phone on the Auckland (NZ) timezone.
  3. create a Sync chain on Desktop
  4. attempt to join the Sync chain on Android (it should WORK)
  5. reset both browser profiles.
  6. change desktop computer to the Auckland (NZ) timezone.
  7. change Android phone to the Los Angeles timezone.
  8. create Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should WORK)
  10. repeat these steps with two Android phones and no Desktop.
    1. unable to test; only have a single Android test device
  11. repeat these steps with a Desktop and an iOS phone
  12. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

example example example example
19550-cross-timezone-1 Screenshot_20211207-141841 19550-cross-timezone-2 Screenshot_20211208-110634

Desktop & iOS - PASSED

example example example example
19550-cross-timezone-3 Image from iOS 19550-cross-timezone-4 Image from iOS (1)

iOS & Android - PASSED

example example example example example example
Image from iOS Image from iOS (1) Screenshot_20211207-145314 Image from iOS (2) Image from iOS (3) Screenshot_20211208-114738

Normal expiration test - PASSED

  1. create a Sync chain on Desktop and keep it open until Step 6 is done.
  2. wait 20 minutes.
  3. attempt to join Sync chain on Android (it should WORK).
  4. reset Android profile.
  5. wait 11 minutes (so that it’s > 30 minutes since generating the code).
  6. attempt to join Sync chain on Android (it should FAIL)
  7. repeat these steps with two Android phones and no Desktop (NOTE: unable to test; only have a single Android test device)
  8. repeat these steps with a Desktop and an iOS phone.
  9. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

example example example
windows-qr-code Screenshot_20211209-133156 Screenshot_20211209-134155

Desktop & iOS - PASSED

example example example
windows-qr-code Image from iOS Image from iOS (1)

iOS & Android - PASSED

example example example example
Image from iOS (1) Screenshot_20211207-161528 Image from iOS Screenshot_20211207-162755

Code expiring too far into the future - PASSED

  1. set up a desktop computer and change the date to 1 day into the future.
  2. set up an Android phone with the correct date and time.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should FAIL)
  5. attempt to join the same Sync chain on iOS (it should FAIL)
example example example
1 Screenshot_20211207-152813 Image from iOS

Old-style QR codes - PASSED

  1. set up a desktop computer with an earlier version of Brave (with the old-style QR codes).
  2. set up an Android phone with support for updated QR codes.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should WORK).
  5. reset both browser profiles.
  6. change time on desktop computer to January 2nd 2022.
  7. change time on Android phone to January 2nd 2022.
  8. create a Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should FAIL).
  10. repeat these steps with an iOS phone instead of an Android one.

Desktop & Android - PASSED

example example example example
old-style-1 Screenshot_20211207-153353 Screenshot_20220102-153717 Screenshot_20220102-153946

Desktop & iOS - PASSED

example example example example
old-style-1 Image from iOS Image from iOS (1) Image from iOS (2)

@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Dec 7, 2021
@stephendonner
Copy link

stephendonner commented Dec 9, 2021

Going to re-do the macOS section for (and fixed) the testcase Normal expiration test to have the correct 20 and 11-minute values, respectively, for the join-success and join-fail cases.

@stephendonner
Copy link

stephendonner commented Dec 9, 2021

NOTE: Also added another test, Android (Sync-chain creator) -> iOS (joiner), since we have the other creator/joined case already covered under iOS & Android, above.

Normal expiration test

Android & iOS - PASSED

Steps:

  1. create a Sync chain on Android and keep it open
  2. wait 20 minutes
  3. attempt to join Sync chain on iOS (it should WORK)
  4. reset Android profile
  5. wait 11 minutes (so that it’s > 30 minutes since generating the code)
  6. attempt to join Sync chain on iOS (it should FAIL)
example example example
Screenshot_20211209-142753 Image from iOS (4) Image from iOS (5)

@btlechowski
Copy link

Verification passed on

Brave 1.33.105 Chromium: 96.0.4664.93 (Official Build) (64-bit)
Revision 17531e0a70b4f8108f2418e8b5117f465077710b-refs/branch-heads/4664@{#1229}
OS Ubuntu 18.04 LTS

Cross-timezone tests - PASSED

  1. set up a desktop on the Los Angeles timezone
  2. set up an Android phone on the Auckland (NZ) timezone.
  3. create a Sync chain on Desktop
  4. attempt to join the Sync chain on Android (it should WORK)
  5. reset both browser profiles.
  6. change desktop computer to the Auckland (NZ) timezone.
  7. change Android phone to the Los Angeles timezone.
  8. create Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should WORK)
  10. repeat these steps with two Android phones and no Desktop.
    1. unable to test; only have a single Android test device
  11. repeat these steps with a Desktop and an iOS phone
  12. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

image image image Screenshot_20211214-093144_Settings Screenshot_20211214-093516_Brave Screenshot_20211214-093537_Brave
image image Screenshot_20211213-124146_Settings Screenshot_20211213-125308_Brave

Desktop & iOS - PASSED

image IMG_0070 IMG_0071
IMG_0072 IMG_0073

Normal expiration test - PASSED

  1. create a Sync chain on Desktop and keep it open until Step 6 is done.
  2. wait 20 minutes.
  3. attempt to join Sync chain on Android (it should WORK).
  4. reset Android profile.
  5. wait 11 minutes (so that it’s > 30 minutes since generating the code).
  6. attempt to join Sync chain on Android (it should FAIL)
  7. repeat these steps with two Android phones and no Desktop (NOTE: unable to test; only have a single Android test device)
  8. repeat these steps with a Desktop and an iOS phone.
  9. repeat these steps with an iOS phone as the Sync chain creator and an Android phone as the Sync chain joiner

Desktop & Android - PASSED

Screenshot_20211214-093537_Brave Screenshot_20220102-230959_Brave

Desktop & iOS - PASSED

IMG_0078

Code expiring too far into the future - PASSED

  1. set up a desktop computer and change the date to 1 day into the future.
  2. set up an Android phone with the correct date and time.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should FAIL)
  5. attempt to join the same Sync chain on iOS (it should FAIL)

Desktop & Android - PASSED
Screenshot_20211213-224610_Brave

Desktop & iOS - PASSED
IMG_0074

Old-style QR codes - PASSED

  1. set up a desktop computer with an earlier version of Brave (with the old-style QR codes).
  2. set up an Android phone with support for updated QR codes.
  3. create a Sync chain on Desktop.
  4. attempt to join the Sync chain on Android (it should WORK).
  5. reset both browser profiles.
  6. change time on desktop computer to January 2nd 2022.
  7. change time on Android phone to January 2nd 2022.
  8. create a Sync chain on Desktop.
  9. attempt to join the Sync chain on Android (it should FAIL).
  10. repeat these steps with an iOS phone instead of an Android one.

Desktop & Android - PASSED

image image Screenshot_20211213-230041_Brave Screenshot_20220102-230959_Brave

Desktop & iOS - PASSED

IMG_0075 IMG_0076 IMG_0077

@stephendonner stephendonner removed the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment