Error syncing from dropbox

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Posts: 20
Joined: February 15th, 2013, 1:28 pm
Location: Barbados

Error syncing from dropbox

Postby Don » June 6th, 2018, 5:18 pm

I'm using the following code to sync specific cases from dropbox:

Code: Select all

function synchroniseDAta()
   recode ME_ED => ME_PARISH;   //sets parish to corresponding Enumeration district
      1-181   =>   1;
      182-295   =>   2;
      296-335   =>   3;
      336-397   =>   4;
      398-418   =>   5;
      419-479   =>   6;
      480-508   =>   7;
      509-521   =>   8;
      522-532   =>   9;
      533-559   =>   10;
      560-583   =>   11;

   cases = maketext("%V%V",ME_PARISH,ME_ED);
   errmsg("sychronising the following cases: Parish = %V, ED = %V",ME_PARISH,ME_ED);      
   if syncconnect(Dropbox) then   //connect to dropbox
      syncdata(BOTH,CENSUS2020_DICT,cases);      //sync Census Data
      syncdata(BOTH,VISITATION_RECORD_DICT,cases);   //sync VR

However after synchronizing CensusData.csdb I get the error message:

Code: Select all

Error: unable to read response from server. See log file for details

When looking in the log file I see the following errors:

Code: Select all

06/06/2018 17:02:07.873 ERROR: Invalid server response: JSON root is not an array
06/06/2018 17:02:07.875 ERROR: [{"id":"5ed66d0c-1847-436b-a552-645801f51f71","caseids":"01001001001002","label":"","data":["101001001001002 0","4010010010010021537"],"notes":[],"deleted":false,"verified":false,"partialSave":{"mode":"field",{"name":"H14A","levelKey":"","recordOccurrence":0,"itemOccurrence":0,"subitemOccurrence":0}},"clock":[{"deviceId":"0a0027000003","revision":1}]}]
06/06/2018 17:02:09.951 ERROR: Error syncing data: 100121

What does it mean that JSON rot is not an array and how can I fix this?

Posts: 1605
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error syncing from dropbox

Postby josh » June 6th, 2018, 8:32 pm

That means that the data in the Dropbox has gotten corrupted. We have seen this happen a few times with partially saved cases but have not been able to figure out the cause. We are looking into it. In the meantime by looking in the sync.log file you can see which case is giving the error - in this instance it is the case with id "01001001001002". Figure out which interviewer sent that case. Delete the file in the Dropbox that is giving the error (you can see the filename in the sync.log file too) and have the interview sync again to send the cases again. Usually on the second try it works.

Return to “Synchronization”