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

Update fails (invalid signature) #12

Closed
rubenvereecken opened this issue Mar 25, 2015 · 19 comments · Fixed by #21
Closed

Update fails (invalid signature) #12

rubenvereecken opened this issue Mar 25, 2015 · 19 comments · Fixed by #21

Comments

@rubenvereecken
Copy link
Contributor

Just copying the issue from tldr-pages/tldr#263.

Related error:

➜  ~  tldr --update
Updating...
Error: invalid signature: 0x2e736370
    at /usr/local/lib/node_modules/tldr/node_modules/unzip/lib/parse.js:59:13
    at processImmediate [as _immediateCallback] (timers.js:345:15)

A lot of people are getting them it seems, including a friend I introduced to the client. It may also be the cause of #11 because the cache got filled improperly.

@rprieto
Copy link
Contributor

rprieto commented Mar 25, 2015

That's a weird one. Also happened to me, then went away on its own. Could it be due to failed downloads, and we try to unzip the file anyway?

Otherwise, there are mentions of the unzip module failing if the archive contains files with "store"-level compression. We could try https://www.npmjs.com/package/unzip2.

@adius
Copy link

adius commented Apr 19, 2015

I get the same error. Is there a quickfix to get it working again?

@rubenvereecken
Copy link
Contributor Author

It should actually already be fixed in the master branch. Try pulling that
in instead of installing it through NPM :).

If that doesn't work I've seriously overlooked something.

On Mon, Apr 20, 2015, 00:26 Adrian Sieber notifications@github.com wrote:

I get the same error. Is there a quickfix to get it working again?


Reply to this email directly or view it on GitHub
#12 (comment)
.

@adius
Copy link

adius commented Apr 20, 2015

…and why don't you publish it on npm? ^^

@rubenvereecken
Copy link
Contributor Author

Good point, @rprieto let's update, the current release op npm is seriously broken 😄.

@kud
Copy link

kud commented Jun 11, 2015

I've got the same problem. Please, publish on npm.

@rubenvereecken
Copy link
Contributor Author

@rprieto publish 👍

@rprieto
Copy link
Contributor

rprieto commented Jun 15, 2015

Done, as 1.0.1! Sorry for the super slow publish. @rubenvereecken let's figure out how to add you as a publisher on npm :)

@kud
Copy link

kud commented Jun 15, 2015

~/P/_/project ❯❯❯ npm install -g tldr                                        ⏎  ⬆
/Users/kud/.nvm/versions/node/v0.12.4/bin/tldr -> /Users/kud/.nvm/versions/node/v0.12.4/lib/node_modules/tldr/bin/tldr
tldr@1.0.1 /Users/kud/.nvm/versions/node/v0.12.4/lib/node_modules/tldr
├── commander@2.3.0
├── deep-extend@0.2.11
├── ms@0.6.2
├── rimraf@2.2.8
├── wrench@1.5.8
├── async@0.9.2
├── marked@0.3.3
├── colors@1.0.3
├── cpr@0.3.3 (graceful-fs@3.0.8)
├── unhtml@0.1.0 (quotemeta@0.0.0, html5-entities@0.5.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── lodash@2.4.2
├── request@2.44.0 (caseless@0.6.0, aws-sign2@0.5.0, forever-agent@0.5.2, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4.0, json-stringify-safe@5.0.1, qs@1.2.2, node-uuid@1.4.3, mime-types@1.0.2, form-data@0.1.4, bl@0.9.4, http-signature@0.10.1, tough-cookie@2.0.0, hawk@1.1.1)
└── unzip2@0.2.5 (setimmediate@1.0.2, pullstream@0.4.1, readable-stream@1.0.33, match-stream@0.0.2, fstream@0.1.31, binary@0.3.0)
~/P/_/project ❯❯❯ tldr                                                          ✱
15 Jun 16:37:26 - Usage: tldr <command>
~/P/_/project ❯❯❯ tldr open                                                  ⏎  ✱
Page not found
Try updating with "tldr --update", or submit a pull request to:
http://github.com/tldr-pages/tldr
~/P/_/project ❯❯❯ tldr --update                                              ⏎  ✱
Updating...
Error: invalid signature: 0x97ad4b50
    at /Users/kud/.nvm/versions/node/v0.12.4/lib/node_modules/tldr/node_modules/unzip2/lib/parse.js:63:13
    at processImmediate [as _immediateCallback] (timers.js:358:17)

normal?

@adius
Copy link

adius commented Jun 15, 2015

It isn't working for me either 😢

@rprieto
Copy link
Contributor

rprieto commented Jun 15, 2015

Ouch. Definitely looks like it's running the latest code with unzip2, so that should have worked. It works fine from here, I'll see if I can reproduce the issue in any way.

tldr --update
Updating...
Done

The ZIP archive from GitHub looks valid, so I don't have any leads yet.

curl -I --silent https://github.com/tldr-pages/tldr/archive/master.zip | grep Location
# Location: https://codeload.github.com/tldr-pages/tldr/zip/master
wget https://codeload.github.com/tldr-pages/tldr/zip/master
unzip -t master
# No errors detected in compressed data of master.

@waldyrious
Copy link
Member

Just came across this as well:

$ tldr --update
Updating...
Error: invalid signature: 0x6c656472
    at /usr/lib/node_modules/tldr/node_modules/unzip/lib/parse.js:59:13
    at processImmediate [as _immediateCallback] (timers.js:363:15)

Adding info about my environment, in case it helps debugging/reproducing the problem:

$ tldr --version
1.0.0

$ npm -v
1.4.28

$ node -v
v0.10.39

$ uname -srv
Linux 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:54:05 UTC 2015

Funny thing. I noticed I had still tldr v. 1.0.0, so I ran sudo npm update -g tldr, then got this:

$ tldr --update
Updating...
Done
Error: invalid signature: 0x6d2e7372
    at /usr/lib/node_modules/tldr/node_modules/unzip2/lib/parse.js:63:13
    at processImmediate [as _immediateCallback] (timers.js:363:15)

(note the "Done" despite the error)

Then I ran tldr --update again and this time it worked without a problem:

$ tldr --update
Updating...
Done

No idea what happened here, but hope it helps somehow.

@adius
Copy link

adius commented Jul 2, 2015

@waldyrious I guess upgrading node and npm first of all wouldn't be too bad ;-)

@waldyrious
Copy link
Member

@adius are the instructions here the recommended way to update nodejs in Ubuntu 12.04 (elementaryOS 0.2 Luna)? I mean, it feels a litthe hackish -- shouldn't sudo apt-get upgrade take care of that automatically (at least for node)? Especially since I had 0.10 installed via:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

(rather than explicitly setup_0.10)

@adius
Copy link

adius commented Aug 10, 2015

The ubuntu package manager is always a little behind.
How about following the instructions on the official webpage? ^^ https://nodejs.org/

@waldyrious
Copy link
Member

I understand about the official Ubuntu package manager, but as I said, I had previously installed using nodesource's ppa, which is why I expected sudo apt-get upgrade to just work. As for the instructions in nodejs.org, the Linux ones seem to be for a manual installation, i.e. upgrading would still not happen automatically, so I fail to see how they would be an improvement.

@HowardPautz
Copy link

Hmmm... I wonder if there is some kind of PATH issue going on here, specific to our own set ups?

Attempting a pristine install of tldr several times, I had similar weird problems, e.g. invalid sig. attempting update, but also got a stream error (noted below). Then, after several --update tries (4 of them) - from different path locations - oddly got a similar, unexpected automagic fix. npm and node are globally installed, of course, so tldr --update failing in a subdir, but then finally working at "/" should be coincidence... hmmm... and then it worked in a subdir!

OS: OSX (older version 10.7.5 [because Yosemite sux]).

Successfully updated node.js, and npm a day ago :
$ npm -v
2.14.4
$ node -v
v4.1.1

Installed tldr as instructed - and because I'm ironic - I tried
$ tldr man
Page not found

/some/arbitrary/place $ tldr --version
1.0.1
/some/arbitrary/place $ tldr --update
( woops ! Got same error twice from two locations)
Updating...
events.js:141
throw er; // Unhandled 'error' event
^
Error: stream.push() after EOF
at readableAddChunk (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_readable.js:168:15)
at SliceStream.Readable.push (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at SliceStream.Transform.push (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at SliceStream.sliceFn (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/pullstream/pullstream.js:81:14)
at SliceStream._transform (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/pullstream/node_modules/slice-stream/slicestream.js:28:10)
at SliceStream.Transform._read (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at SliceStream.Transform._write (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at clearBuffer (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_writable.js:316:5)
at onwrite (/usr/local/lib/node_modules/tldr/node_modules/unzip2/node_modules/readable-stream/lib/_stream_writable.js:274:7)

Tried again from /

/ $ tldr --update
Updating... (also got same error twice from two different locations - with two dif. sigs., of course)
Error: invalid signature: 0x6c644b50
at /usr/local/lib/node_modules/tldr/node_modules/unzip2/lib/parse.js:63:13
at processImmediate as _immediateCallback

And then magically, it just worked fine - and with satisfactory irony:
$ tldr tldr

tldr
Simplified man pages

@rprieto
Copy link
Contributor

rprieto commented Oct 24, 2015

Update from #19: as a temporary workaround, this seems to help:

tldr --clear-cache
tldr --update

igorshubovych added a commit to igorshubovych/tldr-node-client that referenced this issue Dec 3, 2015
…r-pages.github.io static site instead of Github API
igorshubovych added a commit that referenced this issue Dec 11, 2015
Fix #12, #19: download pages zip archive from tldr-pages.github.io static site instead of Github API
@igorshubovych
Copy link
Collaborator

Please update tldr-node-client to 1.1.0:

npm update -g

And then run pages update again

tldr --update

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