none
COM Exception Thrown RRS feed

  • Question

  • When syncing to a network share, I've seen users with the following error resulting from a skipped change, "UnknownError" as well as an exception thrown from COM, "The operation could not be completed. A retry should be performed. (Exception from HRESULT: 0x800704D5)."

    Has anyone else encountered this?  The win32 description for this exception is ERROR_RETRY.

    Tuesday, November 16, 2010 11:05 PM

Answers

All replies

  • Hi.

    Can you give us more information on your technical environment? What OS are you using? What type of provider are you implementing? IS this an intermittent issue or it reproes 100%?

    Just as a quick thought - please see if this http://support.microsoft.com/kb/280815 applies to your scenario.

     

    Hope this helps.

    Adrian

    Wednesday, November 17, 2010 12:41 AM
  • No problem ...

    It is a managed Windows XP client syncing to a DFS network share (Win 2003).  The file sync provider is Sync Framework 1.0 and the implementation is very simple.  This happens fairly consistently for someone syncing more then 1 machine to the same share. 

    public static void DetectChangesOnFileSystemReplica(Guid replicaId, string replicaRootPath, FileSyncScopeFilter filter, FileSyncOptions options)
      {
       FileSyncProvider provider = null;

       try
       {
        provider = new FileSyncProvider(replicaId, replicaRootPath, filter, options);
        provider.DetectChanges();
       }
       finally
       {
        // Release resources
        if (provider != null)
         provider.Dispose();
       }
      }

      public static void SyncFileSystemReplicasOneWay(Guid sourceReplicaId, Guid destinationReplicaId, string sourceReplicaRootPath, string destinationReplicaRootPath, FileSyncScopeFilter filter, FileSyncOptions options)
      {
       FileSyncProvider sourceProvider = null;
       FileSyncProvider destinationProvider = null;

       EventLog myLog = new EventLog();
       myLog.Source = "Desktop Sync";

       try
       {
        sourceProvider = new FileSyncProvider(sourceReplicaId, sourceReplicaRootPath, filter, options);
        destinationProvider = new FileSyncProvider(destinationReplicaId, destinationReplicaRootPath, filter, options);

        destinationProvider.AppliedChange += new EventHandler<AppliedChangeEventArgs>(OnAppliedChange);
        destinationProvider.SkippedChange += new EventHandler<SkippedChangeEventArgs>(OnSkippedChange);

        SyncOrchestrator agent = new SyncOrchestrator();
        agent.LocalProvider = sourceProvider;
        agent.RemoteProvider = destinationProvider;
        agent.Direction = SyncDirectionOrder.Upload; // Sync source to destination

        agent.Synchronize();
       }
       catch (Exception e)
       {
        myLog.WriteEntry("SyncConsole:  An error was encountered while synchronizing changes to: " + destinationProvider.RootDirectoryPath + "  " + e.Message + "\n\n" + e.ToString() + "\n" + e.Data, EventLogEntryType.Error, 500);
       }
       finally
       {
        // Release resources
        if (sourceProvider != null) sourceProvider.Dispose();
        if (destinationProvider != null) destinationProvider.Dispose();
       }
      }

    Wednesday, November 17, 2010 2:30 PM
  • Any thoughts on this one ... ???  It really has me stumped.  The permissions on the network folder are set to Full Control and deleting the metadata files in each folder does not seem to have any effect after they are rebuilt.  

    Thanks 

    Thursday, November 18, 2010 4:56 PM
  • I cannot think of something specific based on the information provided. Is it possible for you to debug and see which line is causing the error?

     

    What exactly do you mean by "Syncing more than one machine to the same share". Do the sync sessions take place in parralel?

    Thursday, November 18, 2010 5:45 PM
  • I need to clairfy ... For a user which encounters this error it happens very consistently.   There will be up to 60 logged exception events which all happen with the same time stamp.  The exception is followed by this message;

    Item must exist as the creation version in contained in destination knowledge

    Unfortunately, sync activity has been known to take place on 2 PCs accessing the same metadata file at roughly the same time.  I know that is an issue in itself.  Since this discovery, however, we have tried with only PC accessing the metadata share.  Everytime, (and from every PC involved in the partnership with the DFS share), this same error is thrown.

    The exception is captured when the OnSkippedChange event is raised.  But, only the message.  I see now that I did not log the entire data collection of the argument ... Darn !

    Any ideas ?

    Thursday, November 18, 2010 9:55 PM
  • From what you say, it looks like the metadata file itself is corrupted somehow.

    Once the metadata is corrupted, probably by the fact that you have ran multiple sessions in the past, there's no guarantee that running only 1 sync session at a time from now on will "un-corrupt" the metadata file.

    One option would be to sync all your replicas (endpoints), discard the metadata file and start with a clean metadata file. The discrepancy between data and metadata is the scenario we avoid getting into, mainly because there's no way out of it.

     

    Hope this helps.

    Adrian

    Thursday, November 18, 2010 10:12 PM
    • Marked as answer by f1ctc95 Wednesday, December 22, 2010 7:57 PM
    Wednesday, December 22, 2010 7:57 PM