Brave-browser: [Android] Sync fail with "Cannot read property 'length' of undefined"

Created on 16 Mar 2020  路  4Comments  路  Source: brave/brave-browser

Description

While testing #8642 ran into a situation where sync started erroring out with "Cannot read property 'length' of undefined" message

Steps to reproduce

  1. Clean install 1.5.111 x64 build
  2. Follow steps from #8642 and verify there is no crash
  3. After steps are done it starts showing error message

Actual result

ARM Device
image
Tablet
image

Expected result

No error message. Sync should work fine

Issue reproduces how often

Easy

Issue happens on

  • Current Play Store version? No
  • Beta build? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device (Phone, Tablet, Phablet): Phone and Tablet
  • Android version: 9 and 10

Brave version

1.5.111

Website problems only

  • Does the issue resolve itself when disabling Brave Shields? NA
  • Does the issue resolve itself when disabling Brave Rewards? NA
  • Is the issue reproducible on the latest version of Chrome? NA

Additional information


Marking it for Android 1.5.x release. Please move it if required @SergeyZhukovsky @anthonypkeane

OAndroid QA Pass - Android ARM QA Pass - Android Tab QA Pass - Android x86 QYes android-core-release bug featursync

Most helpful comment

There are an easier STR:

  1. Create sync chain on desktop
  2. Connect Android device to the chain
  3. Wait for 2 device appear in chain on Android
  4. Close Android app from carousel
  5. Open Android app
  6. Go to settings => sync

All 4 comments

I can confirm I can reproduce the issue.
I had to restart browser after executing STR from https://github.com/brave/brave-browser/issues/8642 .

There are an easier STR:

  1. Create sync chain on desktop
  2. Connect Android device to the chain
  3. Wait for 2 device appear in chain on Android
  4. Close Android app from carousel
  5. Open Android app
  6. Go to settings => sync

Error happens on this line
https://github.com/brave/sync/blob/master/client/sync.js#L56
because Android does not save and give the deviceIdV2 value.

Solution is to add support of deviceIdV2, save/load this string pref on save-init-data / got-init-data .

Verification passed on OnePlus 6T with Android 10 running 1.5.113 x64 stable build

- Verified steps from https://github.com/brave/brave-browser/issues/8704#issuecomment-599550335

Verification passed on Samsung Tab A with Android 9.0 running 1.5.113 x64 stable build

- Verified steps from https://github.com/brave/brave-browser/issues/8704#issuecomment-599550335

Verification passed on Asus Zenfone (x86) with Android 6.0 running 1.5.113 BraveModernx86.apk

Was this page helpful?
0 / 5 - 0 ratings