Document is Invalid Error - UiPath tool

Hello All,

I am facing an issue while opening “Main.xaml” file into UiPath tool. The error message says - “The document is invalid.”

I tired below solutions so far but no luck.

  1. Updated all the project dependent packages.
  2. Rebuild the “project.json” file.

The same bot was working earlier.

Thanks for your help … :slight_smile:

1 Like

Hello @VinayTiwari!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hi @VinayTiwari,
Could you describe it more? Which Studio version do you have. What means that you rebuilt .json file (this shouldn’t be edited or manually opened - can cause project damage). How looks the main.xaml file structure? Have you done anything with it before is starts to not working?

Hello @Pablito,

I am using “2020.10.0 beta. 754” version of the uipath tool.

Initially, the project.json file got corrupt, which leads to error message “Document is Invalid” while opening “main.xaml” file. Rebuilt the project.json file means just cross checked the entries of name, description and main looks good. I haven’t edited anything into .json files.

Initially, it was working fine later on restarted the uipath tool post it throws “Document is Invalid” error message.

Are you able to share this main.xaml and project.json file? You can do it via PM in case of any sensitive data. I would like just dive into it and check what happens.

Sure @Pablito will share the main.xaml and project.json file with you. As of now I am able to open my main.xaml file into Uipath studio and able publish the same at Orchestrator. In short there is no validation error in my child bot.

But once I place my main.xaml file into Master bot folder where all the child bots are present which we do publish at Orchestrator and call each one of them via Master bot, it throws validation error -

“Cannot set unknown member ‘UiPath.Excel.Activities.ExcelApplicationScope.InstanceCachePeriod’.”

I tried to update the project dependent packages to higher version but no luck.

No Sure what is missing here, Pls help !!!

@VinayTiwari
have you tried to remove project.json and run the main

What @Maneesha_de_silva said can be a solution but be careful here because messing with project.json might completely damage you project. For sure do a backup and remember dependencies you have used in the project as those would need to be re-installed in the project.

1 Like

@Maneesha_de_silva the folder is having “project.json” file of my master bot only. For rest of the child bots there is no “project.json” file available in the directory. All the child bots are being invoked from master bot only.

Once I remove the “project.json” file it behaves abnormally, issues remain same.

@Pablito so far I have tried below alternatives but nothing is working -

  1. Commented all the delays.
  2. Created new Project into UiPath Studio and copy pasted the workflow, activities.

Please help here, I am stuck at this point.

I still need mentioned files or more details where and how the problem occurs. Without this it’s hard for me to figure out what the problem is.

1 Like

@VinayTiwari
While aggred with @Pablito mention and in addition to that try below also

opening that file in notepad and removed the Out_Argument and the assign activity which is using the same argument.
if this is also not working means that your file may be corrupted ,

1 Like

@Pablito/@Maneesha_de_silva - I have shared the child bot individually to both of you. Please check once.

Hello.
‘InstanceCachePeriod’ function is available only in Uipath.Excel.Activies 2.9.0-Preview version or higher.

However, because it is Pre Release, Package Manager may not install it.

  1. Manually install Excel Activities on the bot in question.
  2. Install Activities as a full version and redeploy.
1 Like

@JIHUN - I tried to install excel activities and install activities package. Once i reopen my bot it says excel application scope activities are missing with the below error message -

  1. Could not find member ‘InstanceCachePeriod’ in type ‘http://schemas.uipath.com/workflow/activities:ExcelApplicationScope’. Row: 186, Column: 35

  2. Member ‘http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation:VirtualizedContainerService.HintSize’ has already been set on this object. Row: 4080, Column: 96

Try installing higher than 2.9.2 Preview version

Thanks @JIHUN, I restarted my bot couple of times after installing the said packages. Post manually added excel application scope activities and it worked.

This time “InstanceCachePeriod=3000” property is not appearing in the property pane of “ExcelApplicationScope” activity within options area.

Thanks a lot for your help :slight_smile:

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