{"action":"created","issue":{"url":"https://api.github.com/repos/contentful/contentful.js/issues/52","labels_url":"https://api.github.com/repos/contentful/contentful.js/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/contentful/contentful.js/issues/52/comments","events_url":"https://api.github.com/repos/contentful/contentful.js/issues/52/events","html_url":"https://github.com/contentful/contentful.js/issues/52","id":118641958,"number":52,"title":"Sync: I can get the initial sync, but when I set the 'nextSyncToken' option, I get no response.","user":{"login":"jakecarr","id":5979143,"avatar_url":"https://avatars.githubusercontent.com/u/5979143?v=3","gravatar_id":"","url":"https://api.github.com/users/jakecarr","html_url":"https://github.com/jakecarr","followers_url":"https://api.github.com/users/jakecarr/followers","following_url":"https://api.github.com/users/jakecarr/following{/other_user}","gists_url":"https://api.github.com/users/jakecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/jakecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakecarr/subscriptions","organizations_url":"https://api.github.com/users/jakecarr/orgs","repos_url":"https://api.github.com/users/jakecarr/repos","events_url":"https://api.github.com/users/jakecarr/events{/privacy}","received_events_url":"https://api.github.com/users/jakecarr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-24T16:05:21Z","updated_at":"2015-11-24T16:35:01Z","closed_at":null,"body":"Here is my code:\r\n\r\n```javascript\r\n            var syncToken = window.localStorage.getItem('syncToken');\r\n            var entriesString = window.localStorage.getItem('entries');\r\n            var entries = JSON.parse(entriesString);\r\n            client.sync(syncToken ? {nextSyncToken: syncToken} : {initial: true})\r\n                .then(function(response){\r\n                \r\n                    response.items.forEach(function (entity) {\r\n                        if(entity.sys.type === 'Entry'){\r\n                            entries[entity.sys.id] = entity\r\n                        }\r\n                        if(entity.sys.type === 'DeletedEntry'){\r\n                            delete entries[entity.sys.id]\r\n                        }\r\n                    })\r\n                    window.localStorage.setItem('entries', JSON.stringify(entries));\r\n                    window.localStorage.setItem('syncToken', response.nextSyncToken);\r\n            });\r\n```\r\n\r\nIt gets the content fine when 'initial' is set to true, but if I set the 'nextSyncToken' to the 'nextSyncToken' that I got from the previous response, the function passed into the then() method is never called.\r\n\r\nHopefully you can help.\r\n\r\nThank you.\r\n\r\nJake"},"comment":{"url":"https://api.github.com/repos/contentful/contentful.js/issues/comments/159327653","html_url":"https://github.com/contentful/contentful.js/issues/52#issuecomment-159327653","issue_url":"https://api.github.com/repos/contentful/contentful.js/issues/52","id":159327653,"user":{"login":"trodrigues","id":38177,"avatar_url":"https://avatars.githubusercontent.com/u/38177?v=3","gravatar_id":"","url":"https://api.github.com/users/trodrigues","html_url":"https://github.com/trodrigues","followers_url":"https://api.github.com/users/trodrigues/followers","following_url":"https://api.github.com/users/trodrigues/following{/other_user}","gists_url":"https://api.github.com/users/trodrigues/gists{/gist_id}","starred_url":"https://api.github.com/users/trodrigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trodrigues/subscriptions","organizations_url":"https://api.github.com/users/trodrigues/orgs","repos_url":"https://api.github.com/users/trodrigues/repos","events_url":"https://api.github.com/users/trodrigues/events{/privacy}","received_events_url":"https://api.github.com/users/trodrigues/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T16:35:01Z","updated_at":"2015-11-24T16:35:01Z","body":"Hi Jake,\r\n\r\nwhen you call the sync endpoint with a `nextSyncToken`, the then method is only called if any new content was published, any existing entries/assets updated and published or if any content was deleted since the last time you synced.\r\n\r\nIs this the case? Have you changed any content since the last time the content was synced?"}}