Can't open workflow file

When I open my flow I get the following error. How can I fix this?
19.8.0+Branch.master.Sha.680d3a6b9a242ff3a0f9a32b7bf3faba605524aa

Document is invalid

Open Document Error: UiPath.Studio.Contracts.RecoverableException —> UiPath.Studio.Contracts.RecoverableException: The item ‘S:\Bookkeeping\JJ\UiPath\RPA-JournalEntries\Main.xaml’ could not be opened: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WorkflowDocument (ReflectionActivator), Services = [UiPath.Studio.Plugin.Workflow.WorkflowDocument, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IWorkflowDocument], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned —> An exception was thrown while invoking the constructor ‘Void .ctor(System.String, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerFileService, System.Func1[UiPath.Studio.Plugin.Workflow.Debugger.Breakpoints.Services.IProjectBreakpointsService], UiPath.Studio.Contracts.IExtendedFileSystem, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerViewService)' on type 'WorkflowDocument'. ---> Document is invalid (See inner exception for details.) (See inner exception for details.). ---> Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WorkflowDocument (ReflectionActivator), Services = [UiPath.Studio.Plugin.Workflow.WorkflowDocument, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IWorkflowDocument], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned ---> An exception was thrown while invoking the constructor 'Void .ctor(System.String, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerFileService, System.Func1[UiPath.Studio.Plugin.Workflow.Debugger.Breakpoints.Services.IProjectBreakpointsService], UiPath.Studio.Contracts.IExtendedFileSystem, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerViewService)’ on type ‘WorkflowDocument’. —> Document is invalid (See inner exception for details.) (See inner exception for details.) —> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(System.String, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerFileService, System.Func1[UiPath.Studio.Plugin.Workflow.Debugger.Breakpoints.Services.IProjectBreakpointsService], UiPath.Studio.Contracts.IExtendedFileSystem, UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerViewService)' on type 'WorkflowDocument'. ---> Document is invalid (See inner exception for details.) ---> System.IO.InvalidDataException: Document is invalid at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.InitRootActivity(WorkflowDesigner designer, String filename) at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.Build(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName) at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.Load(String fileName) at UiPath.Studio.Plugin.Workflow.Services.DesignerFileService.<>c__DisplayClass13_0.<Load>b__0() at UiPath.Studio.Shared.MVVM.Services.DispatcherExtensions.Invoke(Dispatcher dispatcher, Action action, Boolean onlyBeginInvokeWhenNoAccess) at UiPath.Studio.Shared.MVVM.Services.DispatcherService.Invoke(Action action, Boolean onlyInvokeWhenNoAccess) at UiPath.Studio.Plugin.Workflow.Services.DesignerFileService.Load(String fileName) at UiPath.Studio.Plugin.Workflow.Services.Interfaces.IDesignerFileService.Load(String fileName) at UiPath.Studio.Plugin.Workflow.Services.DesignerFileServiceProxy.Load(String fileName) at UiPath.Studio.Plugin.Workflow.WorkflowDocument..ctor(String path, IDesignerFileService designerFileService, Func1 projectBreakpointsServiceFactory, IExtendedFileSystem fileSystem, IDesignerViewService designerViewService)
at lambda_method(Closure , Object )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
— End of inner exception stack trace —
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
— End of inner exception stack trace —
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters)
at lambda_method(Closure , String )
at UiPath.Studio.Plugin.Workflow.WorkflowDocumentFactory.OpenAsync(String path)
at UiPath.Studio.Core.Services.PersistableServiceBase3.<OnOpenAsync>d__19.MoveNext() --- End of inner exception stack trace --- at UiPath.Studio.Core.Services.PersistableServiceBase3.d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shell.Services.DocumentService.d__45.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Core.Services.PersistableServiceBase`3.d__10.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shell.Services.OpenCloseCommandsService.d__24.MoveNext()
— End of inner exception stack trace —
at UiPath.Studio.Shell.Services.OpenCloseCommandsService.d__24.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shell.Services.OpenCloseCommandsService.d__16.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shell.ViewModels.MainWindowViewModel.d__200.MoveNext(), HResult -2146233088

1 Like

@Joris.Jan.de.Koning In your project folder take a backup of project.json file and delete project.json file and run

Indra,

I still get the same error message with “Document is invalid” as error.

1 Like

@Joris.Jan.de.Koning Can you try this

1 Like

Tried it, but unfortunately still results in the same error.
Is there maybe a way to restore this workflow through the version I’ve published to the Orchestrator previously?

I’ve solved it by contacting our ITD department and let them perform a file restore with backups that had been made on the server. Luckily it works again! :slight_smile:

Indra thanks for your help!