brave-browser: Bookmark folder gets duplicated on desktop when edited on Android device while sync is in progress

Description

Bookmark folder gets duplicated on desktop when edited on Android device while sync is in progress

Devices

Device 1: Ubuntu running bc beta 0.59.8 Device 2: Samsung tab running 1.0.71(Sync2) build

Steps to Reproduce

  1. Create sync chain on desktop
  2. Add an Android device to the sync chain
  3. Add a couple of bookmarks on desktop, ensure it sync to mobile
  4. Add a couple of bookmarks on mobile, ensure it syncs to desktop
  5. Import a bookmark html file on desktop (brave_sorted_1000.zip)
  6. When empty root folder Imported is created, edit the HTML folder in Android and rename to Imported HTML
  7. Wait for sync to complete
  8. Imported HTML is the root folder on bookmarks bar and inside it has another Imported bookmark folder which was the root folder in step 5

Actual result:

screenshot from 2018-12-14 12-40-02 Android has the same folder structre

Expected result:

Imported HTML should contain one sub folder Bookmarks Bar which should further contain 2 nested bookmarks folder 0-99 and Bookmarks Toolbar.

Reproduces how often:

Easy

Brave version (brave://version info)

Brave 0.59.8 Chromium: 71.0.3578.98 (Official Build) beta(64-bit)
Revision 15234034d19b85dcd9a03b164ae89d04145d8368-refs/branch-heads/3578@{#897}
OS Linux

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? Yes

Website problems only:

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

Additional Information

cc: @darkdh @AlexeyBarabash @brave/legacy_qa

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

1+ https://community.brave.com/t/bookmarks-and-passwords-sync-issue/53566/4

One more scenario on duplicate bookmarks sync.

  1. Clean profile 0.61.52
  2. Start sync chain on Desktop windows
  3. Join sync chain through a QR code on Android
  4. Import 1000 bookmarks on Desktop
  5. Make sure 1000 bookmarks synced on Android
  6. Reset sync chain on Desktop
  7. Create a sync chain again between Desktop and Android ( copied sync code from Android)
  8. Verify that duplicate bookmarks synced again on both Desktop and Android

@AlexeyBarabash Here’s what the imported bookmarks folder structure looks like when you import the bookmarks on bc

[+] Root bookmark toolbar
   [-] Imported
     [-] Bookmarks Bar
        [-] 0-99
        [-] Bookmarks toolbar
           [-] 100-199
             [-] .....

Here’s what it looks like after you edit the empty Imported bookmark folder on Android which is basically wrong.

[+] Root bookmark toolbar
   **[-] Imported HTML**
     **[-] Bookmarks Bar**
         [-] Imported
           [-] Bookmarks bar
              [-] 0-99
              [-] Bookmarks toolbar
                 [-] 100-199
                    [-] .....

On Android you don’t create a new folder and move the bookmarks so it should just rename the existing Imported bookmark folder to Imported HTML folder. This is the folder structre am expecting after I edit the folder name on Android.

[+] Root bookmark toolbar
   [-] Imported HTML
     [-] Bookmarks Bar
        [-] 0-99
        [-] Bookmarks toolbar
           [-] 100-199
             [-] .....

Its creating a new root level folder for the Imported folder and pulling in the entire html file under it. Can see two possibility to overcome this

  1. Do not allow editing bookmarks/folders on Android until the sync is complete (doubt this is possible)
  2. Batch sync entire folder structure instead of just sending 50 items per sync call (current behaviour) so that even if the folder/bookmark is edited should avoid this issue