Process xaml : Document is invalid error

Hi Guys,
Facing a very strange issue. I was working on my process, and suddenly the Process.xaml file is throughing the error. I didnt do anything, i was debugging invoked workflow files within the Process xaml. and it started throwing the below error. and i cant open Process xaml anymore.

image

detailed log says -
19.10.4+Branch.support-v2019.10.Sha.fe819a658cad0585a64d2f8af94fad5c30b8d122

The item ‘C:\Users\Chitra.Bhattacharya\Desktop\PoC2_Creating_Schedule_Copy\Process.xaml’ could not be opened: Document is invalid.

Cannot open item: UiPath.Studio.Contracts.RecoverableException: The item ‘C:\Users\Chitra.Bhattacharya\Desktop\PoC2_Creating_Schedule_Copy\Process.xaml’ could not be opened: Document is invalid. —> 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.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.Shared.Document.WorkflowDocumentFactoryBase.OpenAsync(String path, IOpenOptions options)
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__46.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.PersistableServiceBase3.<OpenAsync>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.ViewModels.Project.FileProjectItemViewModel.<OpenExecute>d__18.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.Project.FileSystemProjectItemViewModelBase.<<get_OpenCommand>b__21_0>d.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.Shared.MVVM.Commands.TaskCommand3.d__32.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233088

I can’t get my head around this one. i am stiuck and cant proceed with my work. has anyone faced this issue.

Please help.
Many Thanks

@Rani1978
Are you able to open the individual workflows used within the Process.xaml file?

Is it possible to share the xaml files?

@Rani1978, Following steps may help you:

Step 1: I would suggest to take backup of existing Process.xaml file. (Optional)
Step 2: Open Process.xaml file in Notepad / Notepad ++
Step 3: Remove entry for OutArgument. (It should be within <x:Members> node.)
Step 4: Save file and try to open it within UiPath Studio.
Step 5: Open Process workflow and add outArgument as needed (which you have removed manually in step 3.)

Hope this helps :slight_smile:
Cheers

3 Likes

But my question is i have not touched any argument in Process Xaml. I was just debugging. Moreover i dont have a back up of this , and am unable to open process xaml to be able to edit it.
What should i do.

@Rani1978, It seems like, somehow file is corrupted (Honestly I don’t know why? :slight_smile: ). And hence I suggest to open file in Notepad / Notepad++ and try to fix issue. Give it shot and let me know if you are still facing issue.

Cheers

@Rani1978, I find several topics having same issue. I am posting two out of them here which might help you.

2 Likes

I had this issue myself and it pays to delete the portions of code that were generated last, likely creating the corruption. The compiler does a good job of helping you figure it out once you get the file in an open-able state. thanks for the tip Bhavik_Solanki!

I had the same issue. I was digging in the code using Notepad++ but nothing helped.
To fix this:
I deleted Process.xaml, imported new, clear one from different project and created whole process flow again.