Cannot open item: UiPath.Studio.Contracts.RecoverableException: The project ‘C:\Users\HP\OneDrive\Documents\UiPath\BlankProcess\project.json’ could not be opened: Found invalid data while decoding…
—> System.IO.InvalidDataException: Found invalid data while decoding.
at NuGet.Packaging.NupkgMetadataFileFormat.Read(TextReader reader, ILogger log, String path)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(Stream stream, ILogger log, String path)
at NuGet.Common.FileUtility.SafeRead[T](String filePath, Func3 read) at NuGet.Protocol.LocalPackageFileCache.<>c__DisplayClass9_0.<GetOrAddSha512>b__1() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue()
at NuGet.Commands.LockFileBuilder.CreateLockFile(LockFile previousLockFile, PackageSpec project, IEnumerable1 targetGraphs, IReadOnlyList
1 localRepositories, RemoteWalkContext context, LockFileBuilderCache lockFileBuilderCache)
at NuGet.Commands.RestoreCommand.BuildAssetsFile(LockFile existingLockFile, PackageSpec project, IEnumerable1 graphs, IReadOnlyList
1 localRepositories, RemoteWalkContext contextForProject)
at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token)
at UiPath.NuGet.PackageManager.InstallCore(InstallPackageCommand installCommand)
at UiPath.PackageExplorer.Core.Services.PackageInstaller.InstallWithRootPackageAssemblies(InstallPackageCommand installCommand)
at UiPath.Studio.Nuget.ProjectRestorer.InstallWithRootPackageAssembliesAsync(InstallPackageCommand installPackageCommand)
at UiPath.Studio.Nuget.ProjectRestorer.InstallPackage(InstallPackageCommand installPackageCommand)
at UiPath.Studio.Nuget.ProjectRestorer.Restore(IPackageOperationBehavior packageOperationBehavior, IPackageOperationContext packageOperationContext, InstallPackageCommand restoreCommand, CancellationToken cancellationToken, Boolean includeConfiguredSources)
at UiPath.Studio.Core.Services.Packaging.PackageOperationService.RestoreInternal(IPackageOperationBehavior packageOperationBehavior, IPackageOperationContext packageOperationContext, CancellationToken cancellationToken)
at UiPath.Studio.Core.Services.Packaging.PackageOperationService.<>c__DisplayClass39_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Studio.Core.Services.Packaging.PackageOperationRestoreService.Execute(IWorkflowProjectModel project, Boolean allowTargetFrameworkTemper, CancellationToken cancellationToken)
at UiPath.Studio.Core.Services.Packaging.PackageService.RestoreProjectAsync(IWorkflowProjectModel project, Boolean allowTargetFrameworkTemper, CancellationToken cancellationToken)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.InitializeNewProjectModelInternal(String projectFilePath, IOpenOptions options, Boolean checkCompatibility)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.OpenAsyncInternal(String path, IOpenOptions options)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.OpenAsync(String path, IOpenOptions options)
at UiPath.Studio.Plugin.Workflow.Shared.Project.BaseWorkflowProjectFactory.OpenAsync(String path, IOpenOptions options)
at UiPath.Studio.Core.Services.PersistableServiceBase3.OnOpenAsyncInternal(String path, IFactory
2 resolvedFactory, IOpenOptions options)
— End of inner exception stack trace —
at UiPath.Studio.Core.Services.PersistableServiceBase3.OnOpenAsyncInternal(String path, IFactory
2 resolvedFactory, IOpenOptions options)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OpenAsyncTaskExecute(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OpenAsyncTaskExecute(String path, IFactory
2 resolvedFactory, IOpenOptions options)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Core.Services.PersistableServiceBase
3.OpenAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OpenAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenProjectInternal(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenProjectAsync(OpenInformation openInfo, Boolean shouldCloseSolution)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenNewProjectAsync(String filePath, String factoryId, IProjectTemplate template)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.CreateNewProjectAsync(IProjectTemplate template)
at UiPath.Studio.Shell.ViewModels.StartPageViewModel.<>c__DisplayClass64_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Studio.Shell.ViewModels.StartPageViewModel.ExecuteCommandAsync(Func1 commandExecute) at UiPath.Studio.Shell.ViewModels.StartPageViewModel.OnNewProjectCommand(String project) at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand
3.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
at System.Threading.Tasks.Task.<>c.b__128_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
Try these steps:
- Close any Studio windows.
- Delete the project.json file for the impacted project.
- Open the .local hidden folder in the project. Delete all the content except the db folder. Enter in the db folder and delete its content (references.db file).
- Logout of Assistant
- Delete all the files from %userprofile%.nuget folder.
- Delete all the files from %userprofile%\AppData\Local\UiPath.cache
- Delete all the files from %ProgramData%\UiPath\Packages
- Login to Assistant
- Attempt to reopen the project by opening the Main.xaml file.
1 Like