Found Invalid Data While Decoding

Hi,

I am getting this error. I have tried uninstall and install restart the computer i keep getting this error.

19.4.3+Branch.support/v2019.4.Sha.a8f4efb75012dc834aa4be501a7086e9372ef1b3

The project ‘C:\Users\LiaqFar\Documents\UiPath\OceanCreateRun\project.json’ could not be opened: Found invalid data while decoding…

Cannot open item: UiPath.Studio.Contracts.RecoverableException: The project ‘C:\Users\LiaqFar\Documents\UiPath\OceanCreateRun\project.json’ could not be opened: Found invalid data while decoding… —> System.IO.InvalidDataException: Found invalid data while decoding.
at NuGet.Packaging.NupkgMetadataFileFormat.LoadJson(TextReader reader)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(TextReader reader, ILogger log, String path)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(Stream stream, ILogger log, String path)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(String filePath, ILogger log)
at NuGet.Protocol.LocalPackageFileCache.<>c__DisplayClass8_0.b__1()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at NuGet.Commands.LockFileBuilder.CreateLockFile(LockFile previousLockFile, PackageSpec project, IEnumerable1 targetGraphs, IReadOnlyList1 localRepositories, RemoteWalkContext context) at NuGet.Commands.RestoreCommand.BuildAssetsFile(LockFile existingLockFile, PackageSpec project, IEnumerable1 graphs, IReadOnlyList1 localRepositories, RemoteWalkContext contextForProject) at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__32.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.NuGet.PackageManager.<InstallCore>d__2.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.PackageExplorer.Core.Services.PackageInstaller.<InstallWithRootPackageAssemblies>d__3.MoveNext() in D:\a\1\s\Studio\UiPath.PackageExplorer.Core\Services\PackageInstaller.cs:line 31 --- 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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.Studio.Core.Services.Packaging.PackageOperationBase.<RestoreInternal>d__25.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 93 --- 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.Packaging.PackageOperationBase.<>c__DisplayClass24_0.<<Restore>b__0>d.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 78 --- 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.Packaging.PackageOperationBase.<Restore>d__24.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 78 --- 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.Packaging.PackageOperationRestore.<Execute>d__2.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationRestore.cs:line 45 --- 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.Packaging.PackageServiceBase.<RestoreProjectAsync>d__33.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageServiceBase.cs:line 175 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<InitializeNewProjectModel>d__53.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 442 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<OpenAsyncInternal>d__38.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 220 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<OpenAsync>d__37.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 198 --- 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__19.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 0
— End of inner exception stack trace —
at UiPath.Studio.Core.Services.PersistableServiceBase3.<OnOpenAsync>d__19.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 219 --- 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.CommonServices.ProjectServiceBase.<OnOpenAsync>d__38.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\ProjectServiceBase.cs:line 244 --- 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__10.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 0
— 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__18.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 150
— 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__17.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 131
— 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__21.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 283
— 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.StartPageViewModel.d__26.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\ViewModels\StartPageViewModel.cs:line 125
— 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.TaskCommand`3.d__35.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shared\MVVM\Commands\TaskCommand.cs:line 281
— 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

Thanks,
Farhan

Hi @farhanliaqat,
Make “json” file backup and remove it from project. Then open it from main.xaml and import every needed packages used in the project. The new json file should be automatically generated. Hope this will help :slight_smile:

1 Like

Hi,

No it gives me found invalid data while decoding. It is a new project nothing is there.

19.4.3+Branch.support/v2019.4.Sha.a8f4efb75012dc834aa4be501a7086e9372ef1b3

Found invalid data while decoding.

Open Document Error: UiPath.Studio.Contracts.RecoverableException —> UiPath.Studio.Contracts.RecoverableException: The project ‘C:\Users\LiaqFar\Documents\UiPath\CreateRun\project.json’ could not be opened: Found invalid data while decoding… —> System.IO.InvalidDataException: Found invalid data while decoding.
at NuGet.Packaging.NupkgMetadataFileFormat.LoadJson(TextReader reader)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(TextReader reader, ILogger log, String path)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(Stream stream, ILogger log, String path)
at NuGet.Packaging.NupkgMetadataFileFormat.Read(String filePath, ILogger log)
at NuGet.Protocol.LocalPackageFileCache.<>c__DisplayClass8_0.b__1()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at NuGet.Commands.LockFileBuilder.CreateLockFile(LockFile previousLockFile, PackageSpec project, IEnumerable1 targetGraphs, IReadOnlyList1 localRepositories, RemoteWalkContext context) at NuGet.Commands.RestoreCommand.BuildAssetsFile(LockFile existingLockFile, PackageSpec project, IEnumerable1 graphs, IReadOnlyList1 localRepositories, RemoteWalkContext contextForProject) at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__32.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.NuGet.PackageManager.<InstallCore>d__2.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.PackageExplorer.Core.Services.PackageInstaller.<InstallWithRootPackageAssemblies>d__3.MoveNext() in D:\a\1\s\Studio\UiPath.PackageExplorer.Core\Services\PackageInstaller.cs:line 31 --- 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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.Studio.Core.Services.Packaging.PackageOperationBase.<RestoreInternal>d__25.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 93 --- 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.Packaging.PackageOperationBase.<>c__DisplayClass24_0.<<Restore>b__0>d.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 78 --- 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.Packaging.PackageOperationBase.<Restore>d__24.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationBase.cs:line 78 --- 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.Packaging.PackageOperationRestore.<Execute>d__2.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageOperationRestore.cs:line 45 --- 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.Packaging.PackageServiceBase.<RestoreProjectAsync>d__33.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\Packaging\PackageServiceBase.cs:line 175 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<InitializeNewProjectModel>d__53.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 442 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<OpenAsyncInternal>d__38.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 220 --- 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.Plugin.Workflow.Project.BaseWorkflowProjectFactory.<OpenAsync>d__37.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Project\Factory\BaseWorkflowProjectFactory.cs:line 198 --- 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__19.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 0
— End of inner exception stack trace —
at UiPath.Studio.Core.Services.PersistableServiceBase3.<OnOpenAsync>d__19.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 219 --- 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.CommonServices.ProjectServiceBase.<OnOpenAsync>d__38.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\ProjectServiceBase.cs:line 244 --- 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__10.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Core\CommonServices\PersistableServiceBase.cs:line 0
— 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__20.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 225
— End of inner exception stack trace —
at UiPath.Studio.Shell.Services.OpenCloseCommandsService.d__20.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 235
— 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__14.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\Services\OpenCloseCommandsService.cs:line 88
— 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__206.MoveNext() in D:\a\1\s\Studio\UiPath.Studio.Shell\ViewModels\MainWindowViewModelCommands.cs:line 182, HResult -2146233088

This is the content of Project.Json

{
“name”: “CreateRun”,
“description”: “Blank Process”,
“main”: “Main.xaml”,
“dependencies”: {
“UiPath.Excel.Activities”: “[2.5.3]”,
“UiPath.Mail.Activities”: “[1.4.0]”,
“UiPath.System.Activities”: “[19.4.0]”,
“UiPath.UIAutomation.Activities”: “[19.4.1]”
},
“schemaVersion”: “3.2”,
“studioVersion”: “19.4.3.0”,
“projectVersion”: “1.0.0”,
“runtimeOptions”: {
“autoDispose”: false,
“isPausable”: true,
“excludedLoggedData”: [
“Private:*”,
password
]
},
“projectType”: “Workflow”,
“libraryOptions”: {
“includeOriginalXaml”: false,
“privateWorkflows”:
},
“webServices”:
}

Hi,

Any help on this topic?

Thanks,
Farhan

Hi @farhanliaqat

I had a quick search and it seems to be related to either nuget packages and/or netframework:
https://developercommunity.visualstudio.com/content/problem/557810/error-occurred-while-restoring-nuget-packages-foun.html

I would suggest first to try and clear these two folders:

%userprofile%\AppData\Local\UiPath\.cache
%userprofile%\.nuget\packages

Feel free to backup both folders beforehand.

1 Like

Hi,

This worked like charm thanks.

2 Likes