<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic UnregisterGeodatabaseAsync in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/unregistergeodatabaseasync/m-p/1061626#M40261</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are downloading offline feature layers for use in our application.&amp;nbsp; Following the "best practices" in the example here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/android/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_GeodatabaseSyncTask.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/net/android/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_GeodatabaseSyncTask.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am calling UnregisterGeodatabaseAsync following successful creation of the offline download.&amp;nbsp; However, this call throws an error &lt;SPAN&gt;"Unable to complete operation."&amp;nbsp; The details in the exception are "Cannot access the replica".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why would the server not be able to access the replica?&amp;nbsp; Did it create one? How can I find out what is going on?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;GenerateGeodatabaseJob job = gdbSyncTask.GenerateGeodatabase(generateGdbParams, nativeOfflinePath);&lt;BR /&gt;Geodatabase geodatabase = null;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;   await job.GetResultAsync();&lt;BR /&gt;   geodatabase = job.GetResultAsync().Result;&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;   if (job.Status == JobStatus.Succeeded &amp;amp;&amp;amp; geodatabase != null)&lt;BR /&gt;   {&lt;BR /&gt;      try&lt;BR /&gt;      {&lt;BR /&gt;         await gdbSyncTask.UnregisterGeodatabaseAsync(geodatabase);&lt;BR /&gt;      }&lt;BR /&gt;      catch (Exception ex)&lt;BR /&gt;      {&lt;BR /&gt;         &amp;nbsp; // WHAT?&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 03:06:38 GMT</pubDate>
    <dc:creator>PhilScovis</dc:creator>
    <dc:date>2021-05-26T03:06:38Z</dc:date>
    <item>
      <title>UnregisterGeodatabaseAsync</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/unregistergeodatabaseasync/m-p/1061626#M40261</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are downloading offline feature layers for use in our application.&amp;nbsp; Following the "best practices" in the example here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/android/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_GeodatabaseSyncTask.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/net/android/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_GeodatabaseSyncTask.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am calling UnregisterGeodatabaseAsync following successful creation of the offline download.&amp;nbsp; However, this call throws an error &lt;SPAN&gt;"Unable to complete operation."&amp;nbsp; The details in the exception are "Cannot access the replica".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why would the server not be able to access the replica?&amp;nbsp; Did it create one? How can I find out what is going on?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;GenerateGeodatabaseJob job = gdbSyncTask.GenerateGeodatabase(generateGdbParams, nativeOfflinePath);&lt;BR /&gt;Geodatabase geodatabase = null;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;   await job.GetResultAsync();&lt;BR /&gt;   geodatabase = job.GetResultAsync().Result;&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;   if (job.Status == JobStatus.Succeeded &amp;amp;&amp;amp; geodatabase != null)&lt;BR /&gt;   {&lt;BR /&gt;      try&lt;BR /&gt;      {&lt;BR /&gt;         await gdbSyncTask.UnregisterGeodatabaseAsync(geodatabase);&lt;BR /&gt;      }&lt;BR /&gt;      catch (Exception ex)&lt;BR /&gt;      {&lt;BR /&gt;         &amp;nbsp; // WHAT?&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 03:06:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/unregistergeodatabaseasync/m-p/1061626#M40261</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2021-05-26T03:06:38Z</dc:date>
    </item>
  </channel>
</rss>

