Save Attachment - Length cannot be less than zero

@Louis_liu when downgrading the mail package does it work again for you ?

I was having this issue so tested on a bunch, noting down some successful and some failed content stream as attached. Seems like no relationship with position equaling zero.

Hello friends, any update on this @ovidiuponoran ?

Hi everyone, Hi @Nicolas_Lamoureux
We’ve just implemented a fix, can you please confirm using the attached alpha build (warning: do not use this in production, it is intended only t give us feedback on this issue)
uipath.mail.activities.1.11.1-alpha.1672677.nupkg (2.2 MB)

1 Like

Tanxs @ovidiuponoran

but I download it and the manage package do not see it in the folder i set for it.
Any idea ?

@Nicolas_Lamoureux I downloaded the attachment and I copied it in the local folder set as a “User defined package source” in Manage Packages dialog. I see this in Manage Packages:

I have this in the local folder:

Dear @ovidiuponoran ,

I hate to be a pest but i did just as you did, restart UIpath, still cannot se you version.


@Nicolas_Lamoureux you need to select the option Include Prerelease to see a pre-released package version.

1 Like

Allright, your file work and solved the error message.

Now does it work properly, i cannot say.
Because i’m too green at UI Path, I am not sure how to fix my work here :slight_smile:

I will keep you posted as soon as i can comfirm your fix work

1 Like

Hi @m.slagter, @Louis_liu, @DylanT, @Marton_Janos, @ @Tapiwa, @Paul_Waine1

Using the attached alpha build, please confirm if the activity is working fine for the particular mail messages you’ve had troubles with? To see the package, after you copy it in your local user defined package source, make sure you check “Include Prerelease” in Manage Packages.
uipath.mail.activities.1.11.1-alpha.1680694.nupkg (2.2 MB)

:warning: Being an alpha version, this package is intended only for testing purposes, do not use it in production.

4 Likes

This fix it. tanxs

1 Like

Eureka!! Thanks @ovidiuponoran :smiley:

1 Like

Hi,
I had the same problem and this alpha version 1.11.1 fixed the issue.
Hope the final version will be released soon.

@gael.leguay @Nicolas_Lamoureux @m.slagter Please use 1.11.0-preview version available on the Official feed (make sure Include Prerelease is selected).

Thanks @ovidiuponoran.
I’ll give it a try. For the moment I reverted to version 1.9.5 and it worked for me.

@ovidiuponoran the 1.11.0-preview version solved the problem for me too. Thanks!

1 Like

@ovidiuponoran - This new version also fixed an issue we were seeing with version 1.10.4. Do you have an ETA when the final version will be published to the official feed?

1 Like

The final version will most probably be available with 21.10.

This solution worked for me, I guess the Save Attachment activity has a bug or issue with some type of attachments on the ContentSteam during an internal substring method, perhaps due to specific characters on the attachment’s name?

Who knows, the fact is that using BinaryWriter to download the attachment like shown by @aaskov is a better approach in my case because this way I can save the specific attachments I want from the email instead of all the attachments from the MailMessage without having to use filter expressions.

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