Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected end of file #34

Open
minotaurrr opened this issue Dec 5, 2017 · 24 comments
Open

Unexpected end of file #34

minotaurrr opened this issue Dec 5, 2017 · 24 comments

Comments

@minotaurrr
Copy link

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?

@Definitely-Not-Vlad
Copy link
Contributor

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

@nazrdogan
Copy link

I m getting same error.

@nazrdogan
Copy link

@minotaurrr Did you solve your problem ?

@aiguanglin
Copy link

I m getting same error too.

@digiwala
Copy link

Please solve this issue

@ashokkumar88
Copy link

ashokkumar88 commented Feb 14, 2018

I am getting same error.

Node: 8.9.4
npm: 5.6.0
OS: Windows7

@atulquest93
Copy link

Also getting the same error ! Any solutions ?

@Definitely-Not-Vlad
Copy link
Contributor

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.

@nazrdogan
Copy link

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

@atulquest93
Copy link

@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
Copy link

@nazrdogan Which shoutem cli version you are using ?

@ashokkumar88
Copy link

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

@ashokkumar88
Copy link

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

@nazrdogan
Copy link

@atulquest93 I m using . 0.10.9

@digiwala
Copy link

digiwala commented Feb 23, 2018

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

@gewentao
Copy link

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

@aiguanglin
Copy link

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

@gewentao
Copy link

gewentao commented Mar 1, 2018

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!

@trumhemcut
Copy link

Me too, same issue:

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

@aesqe
Copy link
Contributor

aesqe commented Mar 26, 2018

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
Copy link
Contributor

aesqe commented Apr 11, 2018

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.

@idougwarner
Copy link

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

@davinderkumar
Copy link

$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
Copy link

It worked after I deleted .shoutem folder from user home

$rm -rf ~/.shoutem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests