UiPath Studio 2022.4.1 breaks local file access on my local robot through Assistant

Hi there. I submitted a ticket to UiPath support (because I am licensed with Enterprise) but I noticed an issue with the latest version of Studio 2022.4.1 and I just wanted to post it here.

When I run an automation with UiPath Studio 2022.4.1 (the newest version, just released) my robot does not seem to be able to access a file that is on my C:\ drive.

Before I upgraded to 2022.4.1 it worked just fine. But now I have an issue with my local robot accessing that file.

When I run the automation IN studio through debug or “Run”, it works fine. But when it runs from a package that was published to Orchestrator on my local machine through UiPath Assistant it does not seem to work.

Maybe some kind of robot permission issue?

Anyway, 2022.4.1 breaks existing compatibility with file access in this case.

1 Like

Hi,

FYI, it might be same issue with the following. (not solved yet…)

Regards,

3 Likes

Hi @oscar

Could you share the snippet of how you are accessing the file (which activity and its setup)?

EDIT.
Please see here, it is most likely the cause:

1 Like

Hi @Yoichi, thanks for the share. Yes, this looks like the exact same problem that I am experiencing.

1 Like

Hi @loginerror,

I can confirm that I am using an In argument which is given a default value in the main workflow in the arguments panel.

The argument is a string which is the file path of a JSON file used in the workflow. For example, the file path is something like: “C:\JSON_Files\json_file1.json”.

When the argument with the JSON file path as a string is used in the next activity, the error message reads: “Cannot find the file on disk. Make sure the path is correct.”

But the path is correct and the file exists. So it must be that the argument is being “lost” somehow, when it is called in UiPath Assistant like the user @nosawa experiences.

Anyway, I just downgraded to Studio 2021.4.5 and my processes run from Assistant are working fine again with no changes to the code. Will wait a bit before updating Studio to 2022.4.1…

Hi,

I’m fairly certain that my issue is related.

Since upgrading to 2022.4.1, I can’t access the local .xaml files in the unattended machine through UiPath studio. I haven’t checked every single folder so I’m not 100% sure, but this seems to happen only in folders that I’ve deployed after the upgrade. I’m logged in with a user with full permissions.

Full log:

Error: System.UnauthorizedAccessException: Access to the path ‘C:\Users\servicos.rpaprod.nuget\packages\universalresortsstopsales\1.0.2\lib\net45\Main.xaml’ is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy…ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.FinishInitUriString()
at System.Xml.XmlTextReaderImpl…ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
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(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__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 -2147024891

I’ve also notice that these “new” folders have a new file named “bindings_v2.json”

1 Like

Hi again, @loginerror @Yoichi and @andre.f.pires,

Error still existing in UiPath Studio 22.4.3, I just installed it and tried it out and I still have the same issue.

Hi @oscar,

Yes, I can confirm that on my end too.

The issue still persists , same behaviour as other mentioned above.
Works well on Studio and the same project does not work on UiPath assistant

Thanks for the share. I am going to be trying out Studio 2022.4.4 Enterprise and see if it is fixed.

This is related to the type of Robot that you installed. The Service mode robots will not have the same access to .nuget\packages if the previous process was installed in User-Mode.

So you can create a backup for the packages folder from .nuget\packages and install again the required packages while running the job from Orchestrator for an Unattended robot.

More details here: NuGet packages not accessible after migration

Let us know if this helped.

1 Like

Hi @marian.platonov,

Thanks, I will take a look at this the next time I reinstall UiPath.

And just for the record, but I did not change the “install type” when I reinstalled Studio those past few times. It was always installed in “User-mode”, I never changed it to “Service-mode”.

And I don’t know if the Robot is not able to access the packages, instead it is just not able to access a certain file on the C:\ drive, because variables are all broken.

But I’ll try your fix and see if that works. Thanks.

Hi @marian.platonov, I went ahead and installed 2022.4.4 on my machine just now and the issue still exists. I am going to try deleting the NuGet packages folder before uninstalling 2022.4.4 and going back to 2021.10.8 which works perfectly fine.

Hi again, @marian.platonov, I did what you suggested and deleted the entire nuget folder from “C:\Users<username>.nuget\packages”.

Then I installed the new package with 2022.4.4 and ran it, and I still had the same issue.

Arguments that are assigned in Studio in the Arguments panel do not seem to be picked up by the Robot for some reason.

I am not running this on an unattended Robot, it is an attended one on my PC.

@loginerror, just including you FYI.

@Yoichi, @andre.f.pires, @raj.saifuddin, did you fix this?

This issue is not fixed in 2022.4.4 and it still persists! What is wrong with this whole thing?

I am downgrading to 2021.10.8 for now…

Yep, confirming that downgrading to 2021.10.8 fixes the issue and my automations are able to run successfully from Assistant…

Try these steps:

  • Close all Studio applications.

  • Open and edit uipath.config file (is present in the UiPath Studio installation folder), and perform these changes.

From

  <packageSettings>
    <add key="disableSecureXaml" value="False" />
  </packageSettings>

To

  <packageSettings>
    <add key="disableSecureXaml" value="True" />
  </packageSettings>
  • Copy the package folder with problems somewhere where your robot can access it
  • Open the package folder, and remove/delete the project.json. Then open the .local folder and remove everything except the db folder. Then enter in the db folder and remove the references.db file.
  • Restart the [Studio] (Introduction) machine
  • Open the copied folder and double click on Main.xaml file in order to be opened in Studio.
  • Share your findings.

  • We support backward compatibility, except for breaking changes announced in the official release notes, and following the product lifecycle.
    Newer Robots can execute projects created with older versions of Studio. For example, a project created with Studio 2018.4 should work on a 2019.10 Robot or newer.

  • We do not support forward compatibility. Projects created with newer versions of Studio might not work with older Robots. For example, a project created in Studio 2019.10 might not work with a 2018.4 Robot.

  • Projects created with alpha or beta Studio versions might not be compatible with newer Studio builds, nor can they be executed by newer Robots.

References: Compatibility matrix


Check this post also in the end: Updated UiPath and now get error "Could not find a part of the path" - #11

1 Like

Hi Marian,

Thanks. I’ll be sure to try that. Let me get back to you.

Hi @marian.platonov,

OK, I did all of that. I edited the uipath.config file and changed “disableSecureXaml” to True. I copied the project folder to my desktop and removed the files that you suggested. I restarted my PC. I opened that same project in Studio and had to manually add all of the correct dependencies with the same versions. I published the project to Orchestrator and ran it on my Assistant… and it still doesn’t work…

I wonder why?

Reverting back to 2022.10.8 for now…