Error when Set Asset in Orchestrator - Attempted to access an element as a type incompatible with the array

Hi All,

I am trying to set an asset (Boolean, currently = False), but when I run the set asset activity and I got this error -Attempted to access an element as a type incompatible with the array, System.ArrayTypeMismatchException

I have tried put both True and “True” (a string) as the input value of the activity, but keep getting the same error.

Would any of you know anything of this?

Appreciate your help!

@ianhyj

You need to specify the type also while providing the value for an assest. Try with Convert.ToBoolean(“True”) under the value field of set asset activity.

Let us know if this works for you.

1 Like

Hi @ianhyj

Do you still remember how you overcame this issue?

I have the same problem, it seems that this happens when the bot runs unattended, and I can’t replicate the issue in the studio because it runs successfully from there.

I am setting an integer asset and I get the error message:

Attempted to access an element as a type incompatible with the array.

Anyone found a solution to this? Im experiencing the same issue.

Have got any solution for this problem?

Running into this same issue, trying to upload a string to a Text asset. Verified the variable type is string, the credential type is Text, the folder is correct; no reason I can see that this shouldn’t work. I can even manually set the asset to the same string that the robot is trying to send.

I was getting this error for a Download File Storage activity only in production but not when testing in Studio. I created a separate workflow with a shortened version of the failing workflow. It was working in Studio and production until I upgraded the UiPath.System.Activities package to the newest version. It started throwing the same error again in production but not Studio. I downgraded the package back to 22.4.1 and it worked. I also downgraded the package on my main project and it works now in both production and Studio.