Unable to create new project Studio

Hello everyone,

I have just installed UiPath Studio v 2021.4.0 Community Edition, everything went good.

But when I try to create a new project, i get this error message :

Log details :

Open Document Error: UiPath.Studio.Contracts.RecoverableException
—> UiPath.Studio.Contracts.RecoverableException
—> System.UnauthorizedAccessException: Access to the path ‘C:\Users\a776849\OneDrive - Atos\Documents\UiPath\TestProject\project.json’ is denied.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter…ctor(String path)
at System.IO.File.WriteAllText(String path, String contents)
at System.IO.Abstractions.FileWrapper.WriteAllText(String path, String contents)
at UiPath.Project.WorkflowProjectRepository.Save(IWorkflowProject project, String path)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.SaveAsync(IProject item, SaveInformation info)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.CreateNewAsyncInternal(IProjectTemplate template, ProjectTemplate projectTemplate)
at UiPath.Studio.Core.Services.PersistableServiceBase3.OnNewAsync(TTemplate template, IFactory2 resolvedFactory)
— End of inner exception stack trace —
at UiPath.Studio.Core.Services.PersistableServiceBase3.OnNewAsync(TTemplate template, IFactory2 resolvedFactory)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OnNewAsync(IProjectTemplate template, IFactory2 resolvedFactory) at UiPath.Studio.Core.Services.PersistableServiceBase3.CreateNewAsync(TTemplate template)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.CreateNewAsync(IProjectTemplate template)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
— End of inner exception stack trace —
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenPath(String filePath)
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.ProcessWithCommandLine()
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.<>c__DisplayClass19_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at System.Threading.Tasks.Task.<>c.b__140_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

Any kind of help would be appreciated.

Cheers

Hi @Meloueh01 !
If you open UiPath Studio with admin rights, does the pop-up appear ?

1 Like

Yes, unfortunately I have just tried that at the moment, and i get the same error message.

What if you open the file directly from “C:\Users\a776849\OneDrive - Atos\Documents\UiPath\TestProject\Main.xaml” do you have the same error ?

1 Like

I’ve got a different error message :

different error msg

Log details :

Open Document Error: UiPath.Studio.Contracts.RecoverableException
—> System.Exception: File content is not valid JSON
—> Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path ‘’, line 0, position 0.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at UiPath.Project.ProjectData.WorkflowDataUpgrade.GetLatestProjectData(String projectContent)
— End of inner exception stack trace —
at UiPath.Project.ProjectData.WorkflowDataUpgrade.GetLatestProjectData(String projectContent)
at UiPath.Project.WorkflowProjectRepository.<>c__DisplayClass8_0.b__0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at UiPath.Project.WorkflowProjectRepository.Read(String path, Dictionary2 availablePackages)
at UiPath.Studio.Plugin.Workflow.Project.ProjectJsonReader.ReadAsync(String path)
at UiPath.Studio.Core.Services.PersistableServiceBase3.GetFactoryByPath(String path) at UiPath.Studio.Core.Services.PersistableServiceBase3.ResolveFactory(OpenInformation openInfo)
at UiPath.Studio.Core.Services.PersistableServiceBase`3.OpenAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
— End of inner exception stack trace —
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenPath(String filePath)
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.ProcessWithCommandLine()
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.<>c__DisplayClass19_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at System.Threading.Tasks.Task.<>c.b__140_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

Cordially,

Edit: Created a new project and opened it directly from the Main.xaml file, and i got the first error message stating that the access is denied.

Refer below and follow the same steps.

It looks same issue

1 Like

Hello @Pravin_Patil1 and thank you for your input, I have actually followed the steps written by @nycklander in that post, but that doesn’t seem to be solving my problem.

I still have the same error message.

Cordially,

UPDATE: When I open the project from the project.json file, I have this screen but when I click on Open Main Workflow, it says that Root element is missing.

Log details :

Error: System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri)
at UiPath.Studio.Plugin.Workflow.Document.XamlDocumentReader.ReadAsync(String path)
at UiPath.Studio.Core.Services.PersistableServiceBase3.GetFactoryByPath(String path) at UiPath.Studio.Core.Services.PersistableServiceBase3.ResolveFactory(OpenInformation openInfo)
at UiPath.Studio.Core.Services.PersistableServiceBase3.OpenAsync(OpenInformation openInfo) at UiPath.Studio.Shell.ViewModels.MainWindowViewModel.OpenEntryPoint() at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand3.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
at System.Threading.Tasks.Task.<>c.b__140_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

Can you try to create the project in the C Drive…
It looks like you don’t have full control of the directory…

2 Likes

Apparently that was it, I have just created a new project directly in the C Drive, and it worked fine.

I guess the synchronization with OneDrive is causing me problems.

I need to find a solution on how to fix that.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.