Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

'Sync could not create siteKey' error #9430

Closed
diracdeltas opened this issue Jun 13, 2017 · 2 comments · Fixed by #9431
Closed

'Sync could not create siteKey' error #9430

diracdeltas opened this issue Jun 13, 2017 · 2 comments · Fixed by #9431

Comments

@diracdeltas
Copy link
Member

diracdeltas commented Jun 13, 2017

Test plan

#9431 (comment)


i get this error occasionally on master:

Error: Sync could not create siteKey
    at Object.module.exports.createSiteData (/Users/yan/repos/browser-laptop/js/state/syncUtil.js:484:11)
    at diffs.forEach (/Users/yan/repos/browser-laptop/app/sync.js:134:29)
    at Array.forEach (<anonymous>)
    at AppStore.appStoreChangeCallback (/Users/yan/repos/browser-laptop/app/sync.js:61:9)
    at emitOne (events.js:101:20)
    at AppStore.emit (events.js:191:7)
    at AppStore.emitChanges (/Users/yan/repos/browser-laptop/js/stores/appStore.js:276:14)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
@diracdeltas
Copy link
Member Author

I can repro this by starting the browser with https://www.google.com/#q=test as a single open tab. It appears that {"favicon":"https://www.google.com/images/branding/product/ico/googleg_lodp.ico"} is the site object which is passed to createSiteData

@diracdeltas
Copy link
Member Author

it appears that sometimes the sync appStoreChangeListener is called before the synced object has all of its fields populated

@diracdeltas diracdeltas added this to the 0.19.x (Nightly Channel) milestone Jun 13, 2017
diracdeltas added a commit that referenced this issue Jun 13, 2017
fix #9430

Test Plan:
1. enable sync
2. visit https://www.google.com/#q=test
3. enable the setting to clear browsing history when Brave is closed in about:preferences#security
4. close and restart Brave
5. you should see 'Ignoring entry because we can't create site key' in the console but no errors
bridiver pushed a commit that referenced this issue Jun 14, 2017
fix #9430

Test Plan:
1. enable sync
2. visit https://www.google.com/#q=test
3. enable the setting to clear browsing history when Brave is closed in about:preferences#security
4. close and restart Brave
5. you should see 'Ignoring entry because we can't create site key' in the console but no errors
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.