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

Tablet

No error message. Sync should work fine
Easy
1.5.111
Marking it for Android 1.5.x release. Please move it if required @SergeyZhukovsky @anthonypkeane
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:
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
Verification passed on Samsung Tab A with Android 9.0 running 1.5.113 x64 stable build
Verification passed on Asus Zenfone (x86) with Android 6.0 running 1.5.113 BraveModernx86.apk
Most helpful comment
There are an easier STR: