Could not cast or convert from System.String to UiPath.Models.Workflow FileInfo

studio
18_1

#1

This is a simple task, but found wierd when i got this error…

application is basically a simple… trying to open a browser with google.com. i have no input fields or anything.
Just the text url entered.

when i run this prog, Got an error stating :
Could not cast or convert from System.String to UiPath.Models.Workflow FileInfo.

Anyone experienced?

image


#2

Hi @kk.virags,

what exception you are getting can you take screenshot of the error.

as you attached previous screenshot it seems no error.

Regards,
Arivu


#3

Error :

Could not cast or convert from System.String to UiPath.Models.WorkflowFileInfo.

System.ServiceModel.FaultException: Could not cast or convert from System.String to UiPath.Models.WorkflowFileInfo.

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at UiPath.Models.IUiPathRemoteContract.StartJob(Stream jobInfo)
at UiPath.Models.UiPathProxy.StartJob(JobModel job)
at UiPath.Models.UiPathDuplexProxy.StartJob(JobModel job)
at UiPath.Workflow.Execution.WorkflowRunner.StartJob(JobModel job)
at UiPath.Workflow.Execution.WorkflowRunner.Run(String workflowFilePath, String projectName)
at UiPath.Workflow.ViewModels.MainViewModel.RunWorkflow()
at UiPath.Workflow.ViewModels.MainViewModel.<get_RunWorkflowCommand>b__72_0(Object param)
at UiPath.Workflow.RelayCommand.Execute(Object parameter)


#4

Does your project name, variable names or argument names contain special or language specific characters?
If yes, Can you try with a project without them?


#5

@andrzej.kniola - Hi Andrea, Thanks for responding. I have no variables, arguments in this project. it is just a sequence which has open browser and the URL mentioned in it… i din even have Do activity in here.


#6

Could you attach that workflow?
It sounds really odd… 2018.1 by any chance?


#7

OpenBrowser.xaml (5.1 KB)

@andrzej.kniola - yes, its really wierd. i tried to work in my workplace with the same workflow. it works.
Might be a restart of uiPath helps, but before doing that… wanted to take a chance on enquiring with other folks if there could be any other reason on missing somethign.


#8

yes its 2018.1.


#9

@Gabriel_Tatu any thoughts?


#10

This is very strange. Any other activity works?


#11

Yes! every other activities worked… i did a couple of activity checks like type into, messagebox etc…but in a different sequance. I restarted the ui path and and it worked fine now… but still, as said earlier am not sure what was the error and why it occured earlier. Strange thing is, i ran the same workflow without any changes and it worked fine.

Its the common solution for all softwares though, jus put this question forward as am not sure if am missing any activity installations or plugins etc…

Regards,
KK


#12

@kk.virags: This could be just a one time issue that we might come across, as long as the issue is not recurring not to worry. This happens to me very seldom, whenever something breaks/ fails without a possible logical explanation - I had to close and open the project again, or just restart will fix it.

I’m glad you were able to get it working.


#13

Hi
It’s seems it’s not a one time problem because I have also this. I run UiPath community edition 2017-something

It’s exactly like kk.virags problem. I can’t do anything because of that. Not the smallest activity.

I run my UiPath on a mac under parallels and windows 10.


#14

same Issue here, have no Inputs as well - tried now with inputs (same Issue)
Same Flow with just “open browser IE and URL”, have latest Community Edition, and the execution logs show just execution started and executions ended.

I have no Issues with Studio Execution, just if I try to start from Powershell using following commands

$job ="{‘WorkflowFile’: ‘C:\workspaces\UIPath\job.xaml’, ‘User’: ‘myuser’, ‘Password’: ‘******’, ‘Type’: 0}"
$jobIdResponse = Invoke-RestMethod -Uri http://127.0.0.1:8080/UiPath/service/agent/StartJob -Body $job -Method Post
$jobId = $jobIdResponse.ChildNodes[0].InnerText

all fine here

Invoke-RestMethod http://127.0.0.1:8080/UiPath/service/agent/IsAlive -Method Get

this one shows … true

Tried in the meantime also different Paths, warning this Forum change them as well :slight_smile:

‘C:\workspaces\UIPath\job.xaml’ (two backward slashes)
‘C:\workspaces\UIPath\job.xaml’ (one backward slashes, should be wrong)
‘C:/workspaces/UIPath/job.xaml’ (one forward slashes, works in batch)

Error always: ‘Could not cast or convert from System.String to UiPath.Models.WorkflowFileInfo.’

I run my UiPath on a notebook i7 and windows 10.


#15

i suspect something related to a dotnet version or maybe a windows KB. i don`t remember seeing this error before.


#16

This Window10 and .Net version 4.7.02556


#17

Hi ,
Any update on this issue. I am facing same


#18

hi @JoergG
Did you solved this issue ? I am facing same


#19

UIpath Support wrote:
“Please note we do not support REST API to start the job. You need to use Orchestrator API in order to start the job using PowerShell script. Please follow below link for your reference. Link:
https://orchestrator.uipath.com/v2018.1/reference#jobs_post-1

This Robot API is documented here: https://www.uipath.com/kb-articles/uipath-robot-api … so I asked them why it is not supported?


Error on VDI: "Could not cast or convert from System.String to UiPath.models.WorkflowFileinfo"
#20

UIpath Support stated: “It was supported before v2016.2. The support was removed for later versions
That’s a reason a note is already mentioned at start of document, Note: The Robot API is no longer supported. We recommend using the Orchestrator API.”