-
Notifications
You must be signed in to change notification settings - Fork 41
Wrong folders structure #100
Comments
I think I found a root case of that. The same happens if you do that on laptop, iOS and Android never get the changes. I just receive 0 records on upcoming fetch, maybe it is something with timestamps. Do you guys update timestamps when an object was moved? |
when a bookmark is moved, browser-laptop should be sending an UPDATE record with a new i tried the following on two browser-laptop instances and it worked:
|
@diracdeltas How do timestamps added? I mean want timezone format? For example I use my local on Android device, but probably it is missed because my local is ahead of the sync server time zone? |
i think timestamp is just client time in s: |
@diracdeltas I'm not sure is there a problem with two laptops, but it is when you have diff platforms. The original ticket is that https://github.com/brave/browser-android-tabs/issues/279. But exactly the same happens when you do the rename on laptop, Android and iOS never get that change. I verified I just receive an empty array on |
@SergeyZhukovsky could you re-try with latest 0.17.x? if it's broken there, please try master |
That is the same as this issue #107 |
I think this is still not working correctly, @darkdh collected details yesterday and will update |
Ya I think it was never fixed actually! |
@darkdh can comment with more info, but I think the problem is the way things are merged. It always merges the local version on top of the remote version without checking any kind of timestamp. We tried to work around it in core by keeping track of our own last updated time vs sync timestamp and only matching records that had been updated locally, but still having some issues with that. |
Laptop browser version is 0.17.3, Android sync version 1.3.0 the latest update on f4b5d75 commit
I have an empty profile mostly on production server, there are two folders on top level
Parent1
andTest1
.Test1
has a one bookmark inside. InitiallyTest1
folder was a subfolder ofParent1
and was moved after.seatwork solely conserve misruled
sunder blandish loosed symbiot
acadia bore thanatology assumably
liftable nodding jewry correl
So on a fresh initial sync I have a correct structure, but laptop keeps showing
Test1
as a subfolder ofParent1
. I took logs. Here what I have onGET_EXISTING_OBJECTS
:[{"action":0,"deviceId":{"0":1},"objectId":{"0":196,"1":118,"2":189,"3":208,"4":37,"5":227,"6":63,"7":116,"8":229,"9":123,"10":67,"11":128,"12":84,"13":60,"14":178,"15":180},"bookmark":{"site":{"location":"https://m.facebook.com/","title":"Facebook – log in or sign up","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":false,"parentFolderObjectId":[]},"objectData":"bookmark","syncTimestamp":1497571909002},{"action":0,"deviceId":{"0":1},"objectId":{"0":30,"1":44,"2":28,"3":165,"4":119,"5":114,"6":219,"7":224,"8":48,"9":58,"10":238,"11":252,"12":168,"13":155,"14":188,"15":177},"bookmark":{"site":{"location":"","title":"Test1","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":true,"parentFolderObjectId":[]},"objectData":"bookmark","syncTimestamp":1497571918914},{"action":1,"deviceId":{"0":1},"objectId":{"0":196,"1":118,"2":189,"3":208,"4":37,"5":227,"6":63,"7":116,"8":229,"9":123,"10":67,"11":128,"12":84,"13":60,"14":178,"15":180},"bookmark":{"site":{"location":"https://m.facebook.com/","title":"Facebook – log in or sign up","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":false,"parentFolderObjectId":{"0":30,"1":44,"2":28,"3":165,"4":119,"5":114,"6":219,"7":224,"8":48,"9":58,"10":238,"11":252,"12":168,"13":155,"14":188,"15":177}},"objectData":"bookmark","syncTimestamp":1497571918933},{"action":0,"deviceId":{"0":1},"objectId":{"0":79,"1":251,"2":234,"3":116,"4":33,"5":193,"6":72,"7":214,"8":162,"9":115,"10":189,"11":120,"12":100,"13":247,"14":121,"15":22},"bookmark":{"site":{"location":"","title":"Parent1","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":true,"parentFolderObjectId":[]},"objectData":"bookmark","syncTimestamp":1497571975338},{"action":1,"deviceId":{"0":1},"objectId":{"0":30,"1":44,"2":28,"3":165,"4":119,"5":114,"6":219,"7":224,"8":48,"9":58,"10":238,"11":252,"12":168,"13":155,"14":188,"15":177},"bookmark":{"site":{"location":"","title":"Test1","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":true,"parentFolderObjectId":{"0":79,"1":251,"2":234,"3":116,"4":33,"5":193,"6":72,"7":214,"8":162,"9":115,"10":189,"11":120,"12":100,"13":247,"14":121,"15":22}},"objectData":"bookmark","syncTimestamp":1497571975376},{"action":1,"deviceId":{"0":0},"objectId":{"0":30,"1":44,"2":28,"3":165,"4":119,"5":114,"6":219,"7":224,"8":48,"9":58,"10":238,"11":252,"12":168,"13":155,"14":188,"15":177},"bookmark":{"hideInToolbar":false,"isFolder":true,"parentFolderObjectId":{"0":79,"1":251,"2":234,"3":116,"4":33,"5":193,"6":72,"7":214,"8":162,"9":115,"10":189,"11":120,"12":100,"13":247,"14":121,"15":22},"site":{"location":"","title":"Test1","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""}},"objectData":"bookmark","syncTimestamp":1497572014030},{"action":1,"deviceId":{"0":1},"objectId":{"0":30,"1":44,"2":28,"3":165,"4":119,"5":114,"6":219,"7":224,"8":48,"9":58,"10":238,"11":252,"12":168,"13":155,"14":188,"15":177},"bookmark":{"site":{"location":"","title":"Test1","customTitle":"","lastAccessedTime":0,"creationTime":0,"favicon":""},"isFolder":true,"parentFolderObjectId":[]},"objectData":"bookmark","syncTimestamp":1497572038641}]
After that I send that on
SEND_RESOLVED_RECORDS
:[[{ action: 0, deviceId: [1], objectId: [196, 118, 189, 208, 37, 227, 63, 116, 229, 123, 67, 128, 84, 60, 178, 180], objectData: 'bookmark', bookmark:{ site:{ location: "https://m.facebook.com/", title: "Facebook – log in or sign up", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: false, parentFolderObjectId: null} }, null], [{ action: 0, deviceId: [1], objectId: [30, 44, 28, 165, 119, 114, 219, 224, 48, 58, 238, 252, 168, 155, 188, 177], objectData: 'bookmark', bookmark:{ site:{ location: "", title: "Test1", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: true, parentFolderObjectId: null} }, null], [{ action: 1, deviceId: [1], objectId: [196, 118, 189, 208, 37, 227, 63, 116, 229, 123, 67, 128, 84, 60, 178, 180], objectData: 'bookmark', bookmark:{ site:{ location: "https://m.facebook.com/", title: "Facebook – log in or sign up", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: false, parentFolderObjectId: [30, 44, 28, 165, 119, 114, 219, 224, 48, 58, 238, 252, 168, 155, 188, 177]} }, null], [{ action: 0, deviceId: [1], objectId: [79, 251, 234, 116, 33, 193, 72, 214, 162, 115, 189, 120, 100, 247, 121, 22], objectData: 'bookmark', bookmark:{ site:{ location: "", title: "Parent1", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: true, parentFolderObjectId: null} }, null], [{ action: 1, deviceId: [1], objectId: [30, 44, 28, 165, 119, 114, 219, 224, 48, 58, 238, 252, 168, 155, 188, 177], objectData: 'bookmark', bookmark:{ site:{ location: "", title: "Test1", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: true, parentFolderObjectId: [79, 251, 234, 116, 33, 193, 72, 214, 162, 115, 189, 120, 100, 247, 121, 22]} }, null], [{ action: 1, deviceId: [0], objectId: [30, 44, 28, 165, 119, 114, 219, 224, 48, 58, 238, 252, 168, 155, 188, 177], objectData: 'bookmark', bookmark:{ site:{ location: "", title: "Test1", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: true, parentFolderObjectId: [79, 251, 234, 116, 33, 193, 72, 214, 162, 115, 189, 120, 100, 247, 121, 22]} }, null], [{ action: 1, deviceId: [1], objectId: [30, 44, 28, 165, 119, 114, 219, 224, 48, 58, 238, 252, 168, 155, 188, 177], objectData: 'bookmark', bookmark:{ site:{ location: "", title: "Test1", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: true, parentFolderObjectId: null} }, null]]
and that is what I receive on
RESOLVED_RECORDS
:[{"action":0,"deviceId":[1],"objectId":[196,118,189,208,37,227,63,116,229,123,67,128,84,60,178,180],"objectData":"bookmark","bookmark":{"site":{"location":"https://m.facebook.com/","title":"Facebook – log in or sign up","customTitle":"","favicon":"","lastAccessedTime":0,"creationTime":0},"isFolder":false,"parentFolderObjectId":[30,44,28,165,119,114,219,224,48,58,238,252,168,155,188,177]}},{"action":0,"deviceId":[1],"objectId":[30,44,28,165,119,114,219,224,48,58,238,252,168,155,188,177],"objectData":"bookmark","bookmark":{"site":{"location":"","title":"Test1","customTitle":"","favicon":"","lastAccessedTime":0,"creationTime":0},"isFolder":true,"parentFolderObjectId":null}},{"action":0,"deviceId":[1],"objectId":[79,251,234,116,33,193,72,214,162,115,189,120,100,247,121,22],"objectData":"bookmark","bookmark":{"site":{"location":"","title":"Parent1","customTitle":"","favicon":"","lastAccessedTime":0,"creationTime":0},"isFolder":true,"parentFolderObjectId":null}}]
You can see that it is a correct structure on
RESOLVED_RECORDS
. I have no idea why laptop does it different and more then that iOS also does the same way as laptop.The text was updated successfully, but these errors were encountered: