cli icon indicating copy to clipboard operation
cli copied to clipboard

Unexpected end of file

Open minotaurrr opened this issue 7 years ago • 24 comments

Hi guys,

I'm getting this error when I run shoutem clone

? Select your app Restaurants (39905)
cloning to Restaurants
? Directory Restaurants already exists Overwrite
Cloning 'Restaurants' to 'Restaurants'...
unexpected end of file

Use shoutem last-error for more info


errno:   -5
code:    Z_BUF_ERROR
stack: 
  """
    Error: unexpected end of file
        at Zlib.zlibOnError [as onerror] (zlib.js:133:17)
  """
message: unexpected end of file

Tried brew update but didn't help. Anyone with a similar experience?

minotaurrr avatar Dec 05 '17 14:12 minotaurrr

Hi @minotaurrr,

I've tried replicating the issue with your app (I'm an Admin on the Shoutem Builder, so I'm able to do so, other users can't clone other's' apps).

I was unable to reproduce the issue. This may be an issue with npm, check this issue for more information.

My environment: npm 3.10.10 Node.js 6.11.0 OSX 10.13.1

Definitely-Not-Vlad avatar Dec 05 '17 15:12 Definitely-Not-Vlad

I m getting same error.

nazrdogan avatar Jan 12 '18 22:01 nazrdogan

@minotaurrr Did you solve your problem ?

nazrdogan avatar Jan 15 '18 09:01 nazrdogan

I m getting same error too.

aiguanglin avatar Jan 29 '18 07:01 aiguanglin

Please solve this issue

digiwala avatar Feb 13 '18 08:02 digiwala

I am getting same error.

Node: 8.9.4 npm: 5.6.0 OS: Windows7

ashokkumar88 avatar Feb 14 '18 04:02 ashokkumar88

Also getting the same error ! Any solutions ?

atulquest93 avatar Feb 14 '18 14:02 atulquest93

Hey everyone. Can you please provide your environment details so I can attempt to reproduce the issue?

Looking at other people's reports regarding this, the issue is often tied to an unstable or otherwise unusual internet connection. It's possible that proxies, VPNs or simply a poor connection may be causing issues when attempting to download the issue.

Apparently, Nodejs versions 4.6.0 and 7.X.X help resolve the issue in most cases as well.

Definitely-Not-Vlad avatar Feb 15 '18 09:02 Definitely-Not-Vlad

Mine is now resolved. I updated CLI. its seems ok. I m using node 8.9.4

nazrdogan avatar Feb 15 '18 11:02 nazrdogan

@Vladimir-Vdovic

Shoutem CLI :

-- @shoutem/[email protected] +-- [email protected] | +-- [email protected] | | +-- [email protected] | | | -- [email protected] deduped | | +-- [email protected] | | +-- [email protected] | | | -- [email protected] deduped | | +-- [email protected] | | | -- [email protected] deduped | | +-- [email protected] | | | -- [email protected] deduped | | -- [email protected] | | -- [email protected] deduped | +-- [email protected] | | -- [email protected] | | -- [email protected] deduped | +-- [email protected] | | -- [email protected] | -- [email protected] | -- [email protected] +-- [email protected] | -- [email protected] | -- [email protected] -- [email protected] -- [email protected] +-- [email protected] | -- [email protected] deduped +-- [email protected] | +-- [email protected] | | -- [email protected] deduped | +-- [email protected] | | -- [email protected] | | -- [email protected] deduped | +-- [email protected] | -- [email protected] | -- [email protected] deduped `-- [email protected] deduped

$ node -v v9.5.0

$ npm -v 4.6.1

Windows 8, 64 Bit.

Error : Cloning restro to restro... unexpected end of file

Use shoutem last-error for more info

$ shoutem last-error errno: -5 code: Z_BUF_ERROR stack: """ Error: unexpected end of file at Zlib.zlibOnError [as onerror] (zlib.js:142:17) """ message: unexpected end of file

If you think this error is caused by bug in the shoutem command, you can report the issue here: https://github.com/shoutem/cli/issues

atulquest93 avatar Feb 17 '18 05:02 atulquest93

@nazrdogan Which shoutem cli version you are using ?

atulquest93 avatar Feb 17 '18 05:02 atulquest93

Mine issue resolved now. I downgraded my node version to 7.x.x and it is working fine now.

ashokkumar88 avatar Feb 17 '18 05:02 ashokkumar88

@atulquest93 Downgrade your node version to 7.x.x and it will work.

ashokkumar88 avatar Feb 17 '18 05:02 ashokkumar88

@atulquest93 I m using . 0.10.9

nazrdogan avatar Feb 17 '18 12:02 nazrdogan

node v- 8.9.4 arch -64 bit on windows v- 10 arch -64 bit Pro shoutem-cli v -0.10.9 also tried with node v7.10.1, 7.2.1, 7.5.0

digiwala avatar Feb 23 '18 05:02 digiwala

getting the same error with node v7.10.0, v8.9.4 LTS

gewentao avatar Feb 26 '18 03:02 gewentao

it don`t work with node v7.10.1,npm v4.2.0 macOS v10.13.2

aiguanglin avatar Feb 28 '18 01:02 aiguanglin

Still getting this error with

> npm -v
3.10.10

> node -v
v6.11.0

> shoutem -v
0.10.9

as @Vladimir-Vdovic commented.

macOS 10.12.6

Is anyone working on this issue? Thanks!

gewentao avatar Mar 01 '18 03:03 gewentao

Me too, same issue:

> npm -v
5.6.0
> node -v
v8.5.0
> shoutem -v
0.10.9

trumhemcut avatar Mar 07 '18 07:03 trumhemcut

Sorry for the long wait, everyone, I hope we'll be able to fix this soon.

We've released a new beta version on npm - it does not fix the issue, but it should provide clearer HTTP and unzip errors.

Please install it (npm install -g @shoutem/cli@beta) and try cloning again. When you get an error, please paste it here again.

Thank you for your patience.

aesqe avatar Mar 26 '18 18:03 aesqe

We've published a new beta to npm today (v0.11.0-beta5).

After spending some time reading about zlib errors and trying to replicate this particular error*, we've decided to do the following if a Z_BUF_ERROR is encountered when unpacking tgz archives:

  • try to re-download the failing archive once
  • throw the error if a re-download has failed as well

There's always the possibility that this is a non-fatal error (https://zlib.net/zlib_faq.html#faq05) and the process might be able to continue, but that's hard to determine without more information. Therefore, we'll look into implementing checksums so we can be certain of a downloaded file's integrity.

* the results were inconsistent. We've encountered the error once when running shoutem clone, and everything went fine a minute later when retrying the same command. So, it's probably safe to say that the error is somewhere in the network transfer.

aesqe avatar Apr 11 '18 16:04 aesqe

It is not working on windows 8, 10 but it is working in mac os

idougwarner avatar Jun 11 '18 13:06 idougwarner

$uname -a Darwin Davinders-MBP 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

//MacOS High Sierra; 10.13.2 (17C88)

$ node -v v10.6.0

$ npm -v 6.1.0

$ shoutem -v 0.11.0-beta5

shoutem last-error errno: -5 code: Z_BUF_ERROR stack: """ Error: unexpected end of file at Zlib.zlibOnError [as onerror] (zlib.js:153:17) """ message: unexpected end of file

If you think this error is caused by bug in the shoutem command, you can report the issue here: https://github.com/shoutem/cli/issues

davinderkumar avatar Jul 14 '18 04:07 davinderkumar

It worked after I deleted .shoutem folder from user home

$rm -rf ~/.shoutem

davinderkumar avatar Jul 14 '18 04:07 davinderkumar