While opening my main.xaml it is throwing '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. this error

‘.’, hexadecimal value 0x00, is an invalid character. Line 1, position 1.

Error: System.Xml.XmlException: ‘.’, hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at UiPath.Studio.Plugin.Workflow.Document.XamlDocumentReader.ReadAsync(String path)
at UiPath.Studio.Core.Services.PersistableServiceBase3.<GetFactoryByPath>d__21.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.d__11.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.Execution.Services.ExecutionManagerService.<ProcessExecutionCommand>d__23.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.Execution.ViewModels.DebugViewModel.<ExecuteDebugAsync>d__53.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.DebugTabViewModel.<ExecuteDebugFile>d__121.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 -2146232000

It is important i need to recover it.

@nikhil.s Can you provide the xaml file ?

I cant provide xaml but while opening it in notepad++ it is showing null null null

Hi,
Can you please try like open studio->open your project folder ->select project.json. Then click on Open Main Workflow. Check if you are getting any issue and also verify project.json file with notepad if it contains relevant information or corrupted

@nikhil.s Can you provide a Screenshot of the xaml file opened in Notepad++ ?

While opening main workflow im getting displayed with that error

@nikhil.s Ohh That’s very unusual :sweat_smile: , I’m not very sure if we can recover it through simple methods, Maybe the Forum officials can direct you more on the issue that you are facing. Also can you tell how did this happen ?

Hi @nikhil.s

It looks like the file got somehow corrupted…

Could you let us know the steps you took that resulted in this?

As far as recovering it, it looks like it was damaged permanently. If you published your process in the past though and then run it, the project would be unpackaged in here:

%userprofile%\.nuget\packages

This could potentially allow you to recover the file.

Still, it would be good to know what happened here. All the details of your environment are highly appreciated.
You can use the UiPath Diagnostic Tool for that:
image

What version of Studio is this?