Compilation failed on invoke when changing arguments

When I create a sequence in a library and invoke that sequence in the same library, then change arguments of the original sequence and in the invoking sequence the compilation fails:
Workflow ‘Login_test.xaml’ is invoking workflow ‘Login’ with argument ‘password’ of type ‘SecureString’ which is incompatible with the argument type ‘String’ defined in workflow ‘Login’.

So even when both are SecureString and running the Login_test sequence works perfectly, the compilation fails. Thoughts?

Can you check the error states that, string you have defined in the Login workflow, but passing the securestring to that as parameter. Try passing the string instead of securestring

So changing the arguments using “Edit Arguments” on the invoke in the Login_test allows me to change the argument to “String” (even though Login requires it to be SecureString). It then does do the the first publish stage correctly (thus not giving the other error) but then fails with the following error:

Unable to create activity builder for document. Reason was ‘Failed to create a ‘password’ from the text ‘mysupersecretpassword’. TypeConverter cannot convert from System.String.’.

One additional thing I noticed is that the original error message occurs during:

PREPROCESSING: Verifying dependencies

It appears as though it’s checking against an old version of the Login sequence…

I’ve done some more digging and the it appears it’s caused by having files with the same name (in other directories) that have different arguments. So for example we have “Sequence.xaml” in both Directory1 and Directory2 but with argument dir1 and dir2 respectively it fails to compile with the following error:

Workflow ‘E:\UiPath\TMP\BlankLibrary\Directory2\Sequence_test.xaml’ is invoking workflow ‘Sequence’ with argument ‘dir2’ that does not exists in workflow ‘Sequence’.

Here’s an example of the scenario above: (5.9 KB)

So it’s not caused by changing arguments of a invoked sequence but rather by have multiple sequences with the same filename and different arguments.