Offline works in ios but not android

13433
75
04-22-2014 04:59 PM
CharlesDawley
Occasional Contributor
I have a collector map that works fine in online/offline mode on my iphone.

When I try and use the offline mode on my android tablet the features do not appear.
But when I use the map in online mode the map works as expected.
Tags (2)
75 Replies
AlexFullerton
New Contributor II

I'm having the same issue when importing the .xml workspace doc. Error 999999  A row with this OID already exists. I'm able to import the schema just fine but the data.

I'd really appreciate any ideas about this, I have a lot of data stuck on a device currently and no way to retrieve it.

Its especially infuriating because I can view the data just fine on the device and the application is working perfectly but I just can't sync any of the edits. I even managed to copy the application and the un-synced edits to a different Android device in the hope it was device related but still no luck.

0 Kudos
AlexFullerton
New Contributor II

Just an update here. We've managed to solve this issue by removing the duplicate OIDs. The process included copying the raw .geodatabase files off the device and importing them into SQL lite. You can then view the data in tabular form and query/delete the records with duplicate OIDs (ensuring you keep the feature with the latest date.) Following that use the python script or just export to xml workspace  > import xml workspace to GDB.

The OID's seem to duplicate as a result of doing an offline feature update. The application stores updates as separate records in a separate file and applies them on sync.

BWSCIM
by
New Contributor III

Great work on this Alex, you're input here bailed me out of a tight jam.  Thank goodness for SQLiteBrowser.

RobertRayner1
New Contributor III

Charles Dawley‌ Did you ever sort out why this works on iOS and not Android?

Jeff ShanerRussell Roberts Can you guys provide any insight?

I am having similar issues with syncing errors on Android, but not with iOS.

I can see the map, download it, add a feature, and see it "stored on device."

Then I am getting this error when I try to sync: "An error occurred while synchronizing edits"

Only trying to sync 1 point, with a field 'Number' and a field 'Text'.

Syncs no problem with iPad running ArcGIS Collector (10.2.5)

Have tried syncing with Android 5.0, 4.1.2, 4.2.2.  LTE and WiFi. Android Collector Versions 10.2.7 and 10.2.6.

We used to be able to sync without a problem, no idea what the issue is now.

0 Kudos
Mtclimber03
Occasional Contributor

Hi folks,

I thought I'd weigh in. I also have field staff who have experienced the sync issue on an isolated device. I think this has to be related to large amounts of features being collected or editing before a sync. In my case the problem iPad was trying to sync about 118 new points with about 20 attribute fields. Other field collectors had successfully synced with no problem, but with about 1/2 the amount of features being synced. I agree with someone in a related post that this must be tied to timeout issues etc. Hopefully this can be resloved by esri in a later release.

Regardless, I'm happy to report that the python script did work for me with one caveat. In line 8 of the code make sure it reads something like

   

         output_gdb = 'M:\Working_folder\PHL\\NEW.gdb'

The key for me was ensuring that a 2nd "\" is inserted before the file geodatabase name. Other than that one piece of advice this worked seamlessly. Also an FYI I made communication with the ArcGIS Collector Dev. team a few weeks ago with some suggestions and they do plan on having a developed tool (likely in ArcToolbox) to retrieve data from tablets that refuses to sync in the future. Until then this script works great. Thanks Russell Roberts!

0 Kudos
JuanArdila1
New Contributor

Hello Folks,

I have just encountered the terrible "a row with this OID already exitst" using the python. We are missing very important information for our project. Could anyone help with a working script to solve this issue. I also downloaded the toolbox added by Steve in this forum but I got the same error.

Help please!

Juan

0 Kudos
TonyAlmeida
Occasional Contributor II

I would also like to know how to solve the problem with "A row with this OID Already Esists" with this python script.

We also have encountered the issue with syncing, we get no error it just doesn't completely sync our edits.

0 Kudos
Laurensvan_der_Burgt
New Contributor III

Hi all,

Thanks for the useful information in this post.

In the current version of Collector (10.3) for Android, the synchronisation failure problem still exists:

when starting synchronisation, the progress bar remains stuck at the very beginning.

So far this happened once after succesfully completing about 10 offline collector projects.

My offline dataset contained about 30 jpegs and still was stuck after a complete night of synchronising on a stable WiFi connection.

I have been able to resolve this by using the following steps:

0- make sure that you make a backup copy of the ArcGIS_Collector on your mobile device to avoid any data loss.

1- locate the folder for the offline webmap which fails to synchronise (ArcGIS_Collector\offline_data\.....)

2- locate the .geodatabase file and copy it to a computer using the usb data connection

3- convert this SQLite database to an XML file with the "Export XML Workspace document" tool in the ArcToolbox

(the can be accomplished by drag and dropping the .geodatabase file in the "Input Data" parameter

4- create a new empty File Geodatabase

5- use the "Import XML Workspace Document" tool to attempt to copy the data.

.. in our case this operation failed with the error " "A row with this OID Already Exists" and a bunch of "Field is not editable." errors.

6- download the sqlite command line tool and connect to the .geodatabase file (SQLite Download Page )

7- this tool will allow you to run SQL queries and inspect your data. I have not been able to find any non-unique values though.

8- assumption: because archiving is used, all records apart from the latest version of feature should be safe to delete. The following SQL statement can be used to remove the older versions.

delete from NAME_OF_YOU_FEATURE_CLASS where gdb_to_date < 5373484;

.. Now you should have exactly one version left of each of your features (which should be the most recent one)

9- Retry from 3) to import the features in your geodatase.. Succes for me at this point!

10- (optional) copy the .geodatabase back to your Android device, so you can perform the synchronisation step and store the offline data in the Feature Service.

As a precaution I deleted any intermediate files from the folder (client_delta, .geodatabase-shm, .geodatabase-wal, and all data inside the "SyncGdbRequest" folder)

These steps helped me, if you decide to use them this is of course at your own risk

@Russel Roberts, it would be appreciated if the Collector team could look into this issue.

Best Regards,

Laurens

RobertRayner1
New Contributor III

After working with ESRI support for a couple weeks on this Android not syncing issue, I think we have it solved.

The solution for us was changing the uploadReadAheadSize value in IIS.  We previously had a fairly small value, and we bumped it up to our maximum allowable value of 2147483647. 

0 Kudos
JuanArdila1
New Contributor

Dear Robert,

That sounds great!!! Syncing is an issue that needs to be resolved asap. I have enough of staff telling me their data cannot go to the cloud. How can we see this improvement from now on? Will the fix be implemented in the next collector version or this is already set in the sync process?

0 Kudos