33
Views
5
Comments
[Gzip Compress/Decompress] System.IO.InvalidDataException: Found invalid data while decoding.
Question
gzip-xif
Service icon
Forge asset by Rui Mendes
Application Type
Service

Hi Rui,


I'm integrating a service which outputs a gzip. I have the JSON structure defined for the service:

 and in OnAfterResponse I'm calling the Gzip_BinaryExpand action on the Response.ResponseBinary but I get the following error:

"System.IO.InvalidDataException: Found invalid data while decoding."


I checked the Response.Text which is in this format, 

and checked also the size of Response.BinaryData which is 766756. So the binary exists.

The provider of the service assured me that the format is gzip.


Any clue what can cause the error?


Kind regards,

Lorena

2021-11-19 11-12-44
Rui Mendes

Hello @Lorena Sabou,

The problem can have different reasons.

To better be able to discover the origin of the error.

You have 3 ways available, try to read that response text, try to read the service, or try to save the response binary and then try to read it.

To help in this type of situation, we have the component testing area available.
https://ruihmendes.outsystemscloud.com/Gzip/

I can advise you to first try to read this text in the test zone and in case of success try to find out some error in the structure.

Kind regards,
Rui

2021-11-19 11-12-44
Rui Mendes

In the test I think I have to remove this part

2021-11-19 11-12-44
Rui Mendes

@Lorena Sabou
I found that the test page was in error.
I think I fixed it so you can now use it to test and try to read the text you have compressed

2021-09-08 08-01-41
Lorena Sabou

Hi Rui,


Unfortunately the output is the same when putting the response text in a file. 

This is how the file looks like (longer, ofc)

I will try saving the response binary as well and upload that too.

2021-11-19 11-12-44
Rui Mendes

Due to the above error, I think that it is indeed an error not in the component but in the data that you intend to decompress.

You can try to use another system to try to decompress the data, there are some online.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.