# Issue downloading Balena OS images from API

**URL:** <https://forums.balena.io/t/issue-downloading-balena-os-images-from-api/349494>\
**Category:** balenaOS\
**Created:** [September 28, 2021, 4:44pm UTC](https://forums.balena.io/t/issue-downloading-balena-os-images-from-api/349494 "2021-09-28T16:44:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maggie0002](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@maggie0002](https://forums.balena.io/u/maggie0002)\
**Post date:** [September 28, 2021, 4:44pm UTC](https://forums.balena.io/t/issue-downloading-balena-os-images-from-api/349494/1 "2021-09-28T16:44:00Z")

</div>

I am getting an error when downloading an image using the Balena CLI:

```auto
balena os download raspberry-pi2 -o here1
Getting device operating system for raspberry-pi2
OS version not specified: using latest stable version
Downloading Device OS [========================] 100% eta 47s  
Error: unexpected end of file
    at Zlib.zlibOnError [as onerror] (zlib.js:182:17)

```

```auto
balena os download raspberry-pi -o here2
Getting device operating system for raspberry-pi
OS version not specified: using latest stable version
Downloading Device OS [========================] 100% eta 44s  
Error: unexpected end of file
    at Zlib.zlibOnError [as onerror] (zlib.js:182:17)

```

```auto
balena os download fincm3 -o here        
Getting device operating system for fincm3
OS version not specified: using latest stable version
Downloading Device OS [========================] 100% eta 59s  
Error: unexpected end of file
    at Zlib.zlibOnError [as onerror] (zlib.js:182:17)

```

Raspberry Pi 4 seemed to complete ok, although it does appear to be somewhat intermittent as later the raspberry-pi image succeeded:

```auto
balena os download raspberrypi4-64 -o here5

Getting device operating system for raspberrypi4-64

OS version not specified: using latest stable version

Downloading Device OS [========================] 100% eta 0s

The image was downloaded successfully

```

This issue initially occurred with my GitHub workflows (CLI - 12.45.2) about 12 hours ago. I then tested each image individually about 10 min ago on my Mac and getting the same issue (CLI - 12.44.16). Everything had worked fine until today.

Downloads are also incredibly slow (eta 6m27s for the fincm3 using a 1GB connection in Canada). Are there server issues?

---

<div class="post-metadata">

**Author:** ![markcorbinuk](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/markcorbinuk/32/4771_2.png) [@markcorbinuk](https://forums.balena.io/u/markcorbinuk)\
**Post date:** [October 12, 2021, 10:19am UTC](https://forums.balena.io/t/issue-downloading-balena-os-images-from-api/349494/2 "2021-10-12T10:19:42Z")

</div>

Hello

I’ve just tried some of these downloads using balena CLI v12.47.0 and didn’t encounter any problems. I guess that this may have been a network issue somewhere, but I can’t find any evidence of server problems. In future you can check the status of Balena systems [here](https://status.balena.io/)

Regards - Mark

---

<div class="post-metadata">

**Author:** ![maggie0002](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@maggie0002](https://forums.balena.io/u/maggie0002)\
**Post date:** [October 12, 2021, 10:33am UTC](https://forums.balena.io/t/issue-downloading-balena-os-images-from-api/349494/4 "2021-10-12T10:33:12Z")

</div>

It started working again around 36 hours after the initial post.

I had checked the Balena systems status at the time, and was green across the board.

Will leave it to you guys whether you want to investigate further.

Thanks for getting back on it.
