Download survey from device after upload failed

7261
25
10-03-2016 04:39 AM
Nicole_Ueberschär
Esri Regular Contributor

I thought I had seen this question somewhere before but now I can't find it (neither an answer)...

After the upload of a survey failed with the error "code 1003, Operation rolled back", is there any other option to download the data somehow from the device?

For the error itself I have this thread: https://community.esri.com/message/638532-error-code-1003 

25 Replies
zkovacs
Occasional Contributor III

Hi Nicole,

When connected to the device from your computer (or with a suitable app on the device), you can simply copy the ArcGIS folder to have a backup. The data is organised into My Surveys and My Survey Attachments folders (at least on Android, iOS should be similar).

 It might be a bit tricky to find a particular survey as they are referenced by the Form ID stored in AGOL (so not with the name you gave to your survey). You can find this out if you go to the Form in question in AGOL, click on View Item details and have a look at the URL in the address bar. The part after 'id=' will be the same id used to store the survey on the device.

You can try to recover the data from the runtime database(s), have a look at the below tool available in ArcGIS (10.3+).

https://desktop.arcgis.com/en/arcmap/10.3/tools/conversion-toolbox/copy-runtime-geodatabase-to-file-...

 

I hope this helps.

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

Hi Zoltan, 

I was able to copy a database abc.sqlite from the tablet and could access the data somehow but the way it is stored will be a bit tricky to have it exported into a gdb. Unfortunately the tool you mentioned is not working for sqlite databases as it seems. 

0 Kudos
zkovacs
Occasional Contributor III

Ah, shoot... I thought the same runtime gdb format was being used, but clearly it's not the case - I just had a quick look now. Sorry, I was wrong about the extraction part. On the other hand, you can open the SQLite database directly in ArcGIS (used 10.3.1), but it does not give you any friendly data as everything is stored as it would be sent to the service holding the FS (and you would need to filter for the survey in question as it's being used for all surveys with unsent data)...

It might be best to ask Ismael in case they have some workaround or tool to extract/submit the data easily. You may be able to construct a JSON out of the .sqlite content and use the REST API to send the data in, but I haven't done anything like that yet...

Sorry I couldn't have been of more help this time.

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

Hi Zoltan, 

I didn't get the idea that I could open the sqlite database straight in ArcGIS 🙂  Thanks for that. 

I think I will contact Ismael directly to see if he has something in his pockets to help me. 

0 Kudos
zkovacs
Occasional Contributor III

Hi Nicole,

You're welcome. (Supported DBMS formats list is here.) 🙂

Sounds like a plan. I'd love to know if there is a solution for it too, in case I need to deal with a situation like this in the future. Thanks.

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

After changing my search to something similar to "survey123 export from sqlite" I found this post for troubleshooting Survey123: 

Troubleshoot—Survey123 for ArcGIS | ArcGIS 

The last topic deals with how to recover data from a mobile device.

I tested it with my own copy of the survey, not the original one that my client was using. I adjusted the path to the survey in the database with the sqlite database browser matching the path that was created when I filled a survey on my desktop. Then my survey showed me the four surveys that were not uploaded. 

After removing some of the constraints in the survey I opened the failed surveys, saved them without changing anything and was able to upload them. I only had the impression that one value got lost in a repeated field (which is bad enough).

Maybe this helps someone having similar issues. I still can't really tell, what caused the Error Code 1003 but at least the data is online now. It might have been something to do with those constraints. 

(no answer from Ismael yet)

KarissaRamstead
New Contributor II

I have been trying to work through the same troubleshoot you did, but with no success.  My error is 202.  I have been able to work through the recover data from the mobile device down to replacing the path names using DB Browser.  From there I have no luck.  I have opened the Survey123 Connect on my desktop and I cannot find a place to navigate to these files to upload my data from the desktop.  If I work from the Survey123 on my tablet I am having the same error and I cannot resend the surveys.  And I don't see an obvious way to upload that .sql file with the changed path to Survey123 online.  So I think I am missing a critical step.  Any thoughts on what I might be missing?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Karissa,

Is there additional error text?  It sounds like there is a configuration issue between the feature service and the survey.  The recovery procedure is the workflow you attempted via the tablet (the Survey123 app, not Survey123 Connect).  

0 Kudos
KarissaRamstead
New Contributor II

The send error give the additional text: 

"Incompatible feature service.  Parent to child relationship not found from TCEF_Fire_History (0) to plotRepeat(3)"

0 Kudos