Truffle: Error while unboxing the pet-shop box

Created on 17 Dec 2019  Β·  13Comments  Β·  Source: trufflesuite/truffle

  • [x] I've asked for help in the Truffle Gitter before filing this issue.

Issue

truffle unbox pet-shop
√ Preparing to download
Γ— Downloading
RequestError: Error: read ECONNRESET
at new RequestError (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\errors.js:14:1)
at Request.plumbing.callback (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:87:1)
at Request.RP$callback [as _callback] (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:46:1)
at self.callback (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
at Request.emit (events.js:210:5)
at Request.onRequestError (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
at ClientRequest.emit (events.js:210:5)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Truffle v5.1.4 (core: 5.1.4)
Node v12.13.1

  • npm version (npm --version): 6.12.1

I update the node version but it doesn't work.
but the command truffle unbox pet-shop i use yesterday work well.
i try to look for the file C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1
and i can not find such a file.there is only a build folder.webpack: i can't find it.

needs investigated needs reproduced priority4 πŸ“‹

Most helpful comment

If you are in China, You can use a hosts to solve this problem.
https://github.com/googlehosts/hosts

All 13 comments

I've tried to replicate this on both Node v10 and Node v12 w/ MacOS, but was unsuccessful. Let me see if I can find another team member with more Windows knowledge to look into this.

I have some question
╰─ truffle unbox pet-shop ξ‚² 1 ↡ ξ‚² 3349 ξ‚² 14:15:44 ο€—
βœ” Preparing to download box
βœ– Downloading
βœ– Downloading
RequestError: Error: connect ECONNREFUSED 151.101.228.133:443
at new RequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/errors.js:14:1)
at Request.plumbing.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:87:1)
at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:46:1)
at self.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:185:1)
at Request.emit (events.js:210:5)
at Request.onRequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:881:1)
at ClientRequest.emit (events.js:210:5)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Truffle v5.1.6 (core: 5.1.6)
Node v12.14.0

Do either of you reporting this problem have a proxy or other specific network configuration that could give us clues as to what's happening?

Thanks!

I also got this issue
when running:

truffle unbox webpack

√ Preparing to download box
Γ— Downloading
RequestError: Error: read ECONNRESET
at new RequestError (C:\Users\admin\nvm\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\errors.js:14:1)
at Request.plumbing.callback (C:\Users\admin\nvm\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:87:1)
at Request.RP$callback [as _callback] (C:\Users\admin\nvm\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:46:1)
at self.callback (C:\Users\admin\nvm\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
at Request.emit (events.js:198:13)
at Request.onRequestError (C:\Users\admin\nvm\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Truffle v5.1.5 (core: 5.1.5)
Node v10.17.0

However, when I run

truffle unbox pet-shop

√ Preparing to download box
√ Downloading
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

√ cleaning up temporary files
√ Setting up box

It seems Ok.
I can't find the reason.

If you are in China, You can use a hosts to solve this problem.
https://github.com/googlehosts/hosts

To everyone in this thread, can we confirm that this is a problem with China's great firewall?

I added the #GoogleHosts# part to my hosts file, and then I ran truffle unbox webpack.
It seems to work now.

√ Preparing to download box
√ Downloading
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

√ cleaning up temporary files
√ Setting up box

I'm not sure if it is because of the China's firewall against google.
But anyway thanks, I'll try a couple of times later to confirm if it really works.

If possible, I'd love to investigate workarounds to make this easier.

i also have this problem

Three days ago it is successfully when running "truffle unbox pet-shop", but today it doesn't work.

Starting unbox...

βœ” Preparing to download box
βœ– Downloading
Unbox failed!
βœ– Downloading
Unbox failed!
RequestError: Error: connect ECONNREFUSED 0.0.0.0:443
at new RequestError (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/errors.js:14:1)
at Request.plumbing.callback (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:87:1)
at Request.RP$callback [as _callback] (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:46:1)
at self.callback (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:185:1)
at Request.emit (events.js:310:20)
at Request.onRequestError (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:881:1)
at ClientRequest.emit (events.js:310:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Truffle v5.1.22 (core: 5.1.22)
Node v12.16.2

Three days ago it is successfully when running "truffle unbox pet-shop", but today it doesn't work.
Starting unbox...
βœ” Preparing to download box
βœ– Downloading
Unbox failed!
βœ– Downloading
Unbox failed!
RequestError: Error: connect ECONNREFUSED 0.0.0.0:443
at new RequestError (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/errors.js:14:1)
at Request.plumbing.callback (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:87:1)
at Request.RP$callback [as _callback] (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:46:1)
at self.callback (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:185:1)
at Request.emit (events.js:310:20)
at Request.onRequestError (/home/niejun/nodejs/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:881:1)
at ClientRequest.emit (events.js:310:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Truffle v5.1.22 (core: 5.1.22)
Node v12.16.2

I had the same problem, have you solved it, please help me, thx

@youwenbusi
I'm sorry that i have no idea. But you can find a set of boilerplates in https://github.com/truffle-box.
So you can using "git clone https://github.com/truffle-box/pet-shop-box" instead of "truffle unbox pet-shop"

I have a similar issue like below:

$ truffle unbox pet-shop

Starting unbox...

  • Preparing to download box
    Ξ“ΓͺÜ Preparing to download box
  • Downloading
    β”œΓΉ Downloading
    Unbox failed!
    β”œΓΉ Downloading
    Unbox failed!
    RequestError: Error: getaddrinfo ENOENT raw.githubusercontent.com
    at new RequestError (C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\errors.js:14:1)
    at Request.plumbing.callback (C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:87:1)
    at Request.RP$callback [as _callback] (C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:46:1)
    at self.callback (C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
    at Request.emit (events.js:315:20)
    at Request.onRequestError (C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
    Truffle v5.1.41 (core: 5.1.41)
    Node v12.18.3

I added below, am still getting error:

  1. add GoogleHost from https://github.com/googlehosts/hosts/blob/master/hosts-files/hosts to C:\Windows\System32\drivers\etc\hosts
  2. VPN

I don't have problem download the project from web browser without above.

Any idea?

Was this page helpful?
0 / 5 - 0 ratings