Error when trying to invoke code

Hello!
I’ve been given a project to improve, I’m now recieving a error when I reach a invoke code block that I have not altered or tampered with in any way. I have no clue why it is acting up now, I got a similar or equal error a while back when I tried to invoke code of my own but thought nothing of it since I assumed I was doing something wrong (which I was and could simply use assign activity).

Anyways, this is the error I’m recieving:

Check Personnummer: Method not found: 'System.Collections.Immutable.ImmutableArray`1<Byte> System.Reflection.Metadata.MetadataReader.GetBlobContent(System.Reflection.Metadata.BlobHandle)'.

This is the code-block and it’s arguments:

This is the VB.Net Code:

Dim Multi As Integer = 1, sum As Integer, partSum As Integer

For i As Integer = pNum.Length-1 To 0 Step -1
	partSum = Val(pNum(i)) * Multi
	If partSum > 9 Then partSum = partSum - 9
	sum = sum + partSum
	If Multi = 2 Then Multi = 1 Else Multi = 2
Next

If sum Mod 10 = 0 Then Result = True Else Result = False

Anyone has any idea how to remedy this? :face_with_raised_eyebrow:
PS: Will not respond untill tomorrow morning (EU) :heart:

Hi,

In my environment, your code works.

Sample20230927-4aL.zip (2.7 KB)

To isolate cause, can you share your project as file and/or try to run the above sample?

Regards,

I’m sadly not allowed to share my code since parts of it is sensitive, your code worked just fine when ran on the same pc as my project though!

HI,

Can you try to upgrade or downgrade your activities package to version which is same as my project? If it still doesn’t work, there might be something wrong with xaml file…

Regards,

I tried to downgrade my UiPath.System.Activities to v23.4.3
image
which seems to be what is used in your project, but I still had the same error

Check Personnummer: Method not found: 'System.Collections.Immutable.ImmutableArray`1<Byte> System.Reflection.Metadata.MetadataReader.GetBlobContent(System.Reflection.Metadata.BlobHandle)'.

Hello! I’m facing the same scenario as you, did you find a workaround to fix it? Thanks!

Sorry no, I’ve resorted to not using that activity all together for now.

The Invoke Code activity does not throw any errors when I run it from a Windows project, only when I try to run it on my older Windows Legacy projects which I can’t just upgrade because that causes other issues.
But that might be worth trying for you if you have the same problem.

1 Like

Thanks for the workaround! I tried it with the Windows version, and the activity worked as expected. This issue is a bit unusual because the specs for the new release didn’t indicate that the Invoke Code would be discontinued from the legacy versions.

Thanks again!

1 Like

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