Select to view content in your preferred language

Collector Offline Map Sync Failed "Unknown error occurred"

4998
13
Jump to solution
02-26-2020 05:02 PM
ChazOlloqui
New Contributor II

After a long day of collecting data in the field using an offline map area, we've received the Sync Error "Unknown error occurred".  I've followed the instructions of adding global ids to our sde dataset and registering as versioned ("Register the selected objects with the option to move edits to base" unchecked), which allowed us to create an offline map area, but when we try to sync our edits through cell service or wifi, we receive the same error.  Does anyone know why this error would arise? 

Thanks

0 Kudos
13 Replies
pfoppe
by MVP
MVP

That is correct.  

For many of our published ArcGIS Server services - we use the "Operating System Authentication" (OSA) login when publishing.  This is the Active Directory (AD) account that the ArcGIS Server runs as.  Our data admins/publishers will grant the ArcGIS Server AD account the read/write permissions to the database objects.  Most of these workflows are for read-only access - publish the service and let customers consume it for mashing up with other datasets.  

Although for some workflows (like the Esri offline 'feature server sync' capabilities) we use a SQL Server built-in account; we do NOT use the OSA account.  The main driver for this was when the user syncs an offline map, there is a version created and owned by the account that was used to publish to server with (so the account the server uses to connect to SQL).  If we used the OSA account, then it was challenging to manage that version without having full geodatabase administration ("sde" account) access.  With the 'headless built-in SQL account', we can provide that account connection file to certain staff members who can then manage their back-end version by rec/posting to the parent version.  The only way to do that with OSA would be to login to a computer with that same OSA account, or over-ride the version permissions to "PUBLIC", or give the user full SDE level admin access.

So for the situation highlighted above...  

GIS Specialists use a built-in SQL account to 'own' the data.  This is the account they would connect as when creating a feature class, granting permissions, applying indexes, making schema changes, etc.  Lets call this account "dataowner".  Objects in the database (lets call the database "mydatabase") end up looking like: mydatabase.dataowner.table_name

The GIS specialists then use a different built-in SQL account to 'publish' the data to ArcGIS Server.  This is the account they would connect with when publishing from ArcMap/ArcGIS PRO.  Lets call this account "dataeditor".  The GIS Spec will use the "dataowner" account to grant read/modify permissions on the "table_name" to the dataeditor account.  

When the user synchronizes the offline edit, then a version is usually created in the geodatabase that is owned by the 'dataeditor' account.  EX - dataeditor.my_version

The problem we ran into was that when the 'dataeditor' SQL account was created, it was inadvertently mapped to the schema owned by "dataowner".  

HTH.

0 Kudos
JasonWegner
New Contributor III

Thanks for the super detailed reply.  So, in my situation, we publish (and always have) with a built-in SQL account.  All schema changes, featureclass creation, and such, happens with this account as well.  That's the dataowner as you mentioned above, except that, I think my database is "owned" by the dbo user.  My tables are named mydatabase.dbo.table_name.  (this is where my knowledge is admittedly weak)  Nevertheless, I believe that dataowner and dataeditor in this case are one in the same. 

Regardless, even though I grant the dataowner account the proper rights, it still doesn't affect the outcome.  I called tech support about this yesterday and they're working on it, too.

0 Kudos
pfoppe
by MVP
MVP

Sounds like you are running "DBO Schema" database where your "dataowner" SQL account is either mapped as the  actual database owner or added to the sysadmin role - A comparison of geodatabase owners in SQL Server—ArcMap | Documentation 

If you are publishing to server with this same SQL Account then yes, it sounds like your dataowner ("DBO") and account you use for publishing are one in the same.  

Double check the permission applied in your database against their documentation - Privileges for geodatabases in SQL Server—ArcMap | Documentation 

We missed a couple of these, and really discovered that a 'data editor' that is running the offline sync workflow actually needs the data creator permissions.  specifically: 

  • CREATE TABLE
  • CREATE PROCEDURE
  • CREATE VIEW
  • Users who create data must have a default schema with the same name as their database user name
0 Kudos
vijaybadugu
Occasional Contributor II

I am able to get rid of the error . Actually the map is Read-Only (Query,Sync) , But When i try to "Check for Updates" in ArcGIS Field Maps, The Updates are not showed up.

0 Kudos