# JS embed נכשל עם "Job exception: invalid stored block lengths (Zlib::DataError)"

**URL:** <https://meta.discourse.org/t/js-embed-fails-with-job-exception-invalid-stored-block-lengths-zlib-dataerror/209867>\
**Category:** Product Support\
**Created:** [22 בנובמבר,‏ 2021,‏ 5:30pm UTC](https://meta.discourse.org/t/js-embed-fails-with-job-exception-invalid-stored-block-lengths-zlib-dataerror/209867 "2021-11-22T17:30:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [22 בנובמבר,‏ 2021,‏ 8:41pm UTC](https://meta.discourse.org/t/js-embed-fails-with-job-exception-invalid-stored-block-lengths-zlib-dataerror/209867/5 "2021-11-22T20:41:23Z")

</div>

Looks like if I send a request to your webserver as

```plaintext
curl 'https://bitwiggers.com/presets/d1a7c2c7-848d-425c-9058-993317cbcc9c/' -H 'accept-encoding: deflate, gzip' -vv

```

I get back a `deflate` compressed response, where most webservers when given the two options would prefer using `gzip`. That’s weird.

I see that I can easily reproduce this error with

```ruby
require 'excon'
response = Excon.get('https://bitwiggers.com/presets/d1a7c2c7-848d-425c-9058-993317cbcc9c/',
 headers: {'accept-encoding' => 'deflate, gzip'})

# fails, default in excon
Zlib::Inflate.new(-Zlib::MAX_WBITS).inflate(response.body)

#works
Zlib::Inflate.new(0).inflate(response.body)

```

This code is over 8 years old in Excon, so I’d guess your webserver is at fault here, but I reported it upstream anyway

[https://github.com/excon/excon/issues/768](https://github.com/excon/excon/issues/768)

---

_[View the full topic](https://meta.discourse.org/t/js-embed-fails-with-job-exception-invalid-stored-block-lengths-zlib-dataerror/209867)._
