Closed RunHippo closed 2 years ago
Same
> truffle unbox pet-shop
Starting unbox...
=================
✔ Preparing to download box
✖ Downloading
Unbox failed!
✖ Downloading
Unbox failed!
Error: Error connecting to github.com. Please check your internet connection and try again.
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/box/dist/lib/utils/unbox.js:45:1
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/truffle/build/webpack:/packages/box/dist/lib/utils/unbox.js:6:41)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Truffle v5.3.13 (core: 5.3.13)
Node v14.16.1
And connection to github.com works well using wget github.com
.
Using proxy or not does not effect the result.
Hi @RunHippo,
We were unable to reproduce this. Though we have seen it when we simulate network connection issues. Could it be an internet issue on your side?
That's a good suggestion @yipu0v0 ! I'll update the output. The following command might help trace down the issue.
$ DEBUG=unbox truffle unbox pet-shop ps
When I test the command I get the following output
$ DEBUG=unbox truffle unbox pet-shop ps
Secp256k1 bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
unbox { in: 'pet-shop',
unbox out: 'https://github.com:truffle-box/pet-shop-box' } +0ms
Starting unbox...
=================
✔ Preparing to download box
✔ Downloading
npm WARN pet-shop@1.0.0 No description
npm WARN pet-shop@1.0.0 No repository field.
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful, sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
Run dev server: npm run dev
I still have the same error. But I can use git clone to get the project.
➜ crypto DEBUG=unbox truffle unbox pet-shop ps
Secp256k1 bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
unbox { in: 'pet-shop', out: 'https://github.com:truffle-box/pet-shop-box' } +0ms
Starting unbox...
=================
✔ Preparing to download box
✖ Downloading
Unbox failed!
✖ Downloading
Unbox failed!
Error: Error connecting to github.com. Please check your internet connection and try again.
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/box/dist/lib/utils/unbox.js:45:1
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/truffle/build/webpack:/packages/box/dist/lib/utils/unbox.js:6:41)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Truffle v5.3.13 (core: 5.3.13)
Node v14.16.1
Going to close this now that #4169 is released. Feel free to open a new issue if there's still a problem.
same issue with truffle unbox on ubuntu and win10
✔ Preparing to download box ✖ Downloading Unbox failed! ✖ Downloading Unbox failed! Error: Error connecting to https://raw.githubusercontent.com/truffle-box/Metacoin-box/master/truffle-box.json. Please check your internet connection and try again.
Request failed with status code 503 at createError (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/createError.js:16:1) at settle (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/settle.js:17:1) at IncomingMessage.handleStreamEnd (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/adapters/http.js:260:1) at IncomingMessage.emit (node:events:406:35) at endReadableNT (node:internal/streams/readable:1343:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Truffle v5.4.11 (core: 5.4.11) Node v16.9.1
Truffle v5.4.11 (core: 5.4.11) Solidity v0.5.16 (solc-js) Node v16.9.1 Web3.js v1.5.2
FYI. "wget raw.githubusercontent.com" works good on my terminal. and i can git clone.
Mac:
✔ Preparing to download box ✖ Downloading Unbox failed! ✖ Downloading Unbox failed! Error: self signed certificate in certificate chain at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34) at TLSSocket.emit (events.js:400:28) at TLSSocket._finishInit (_tls_wrap.js:936:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12) Truffle v5.4.14 (core: 5.4.14) Node v14.17.6
Hello @wilmerhenao, can you please share the full unbox command as well the output running with debug environment?
You can enable debug output for unboxing via...
$ DEBUG=unbox truffle unbox <your-box>
Sovled by adding http_proxy
and https_proxy
.
same issue with win 11 executing truffle unbox react
PS D:\code\web3> truffle unbox react
Starting unbox...
=================
√ Preparing to download box
× Downloading
Unbox failed!
× Downloading
Unbox failed!
Error: Error connecting to https://raw.githubusercontent.com/truffle-box/react-box/master/truffle-box.json. Please check your internet connection and try again.
Request failed with status code 503
at createError (C:\Users\Roger lee\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\lib\core\createError.js:16:1)
at settle (C:\Users\Roger lee\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\lib\core\settle.js:17:1)
at IncomingMessage.handleStreamEnd (C:\Users\Roger lee\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\lib\adapters\http.js:269:1)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Truffle v5.4.22 (core: 5.4.22)
Node v14.16.0
while no problem of fetching content using PowerShell:
PS D:\code\web3> (Invoke-WebRequest -Uri https://raw.githubusercontent.com/truffle-box/react-box/master/truffle-box.json).content
{
"ignore": ["README.md", ".gitignore", "box-img-lg.png", "box-img-sm.png", ".github"],
"commands": {
"Compile": "truffle compile",
"Migrate": "truffle migrate",
"Test contracts": "truffle test",
"Test dapp": "cd client && npm test",
"Run dev server": "cd client && npm run start",
"Build for production": "cd client && npm run build"
},
"hooks": {
"post-unpack": "cd client && npm ci"
}
}
Same issue with mac m1 executing truffle unbox pet-shop. Adding http_proxy and https_proxy don't solve problem. Anyone help?
while no problem of fetching content using curl:
✔ Preparing to download box ✖ Downloading Unbox failed! ✖ Downloading Unbox failed! Error: Error connecting to https://raw.githubusercontent.com/truffle-box/metacoin-box/master/truffle-box.json. Please check your internet connection and try again.
Request failed with status code 503 at createError (/home/rock_u/.nvm/versions/node/v17.6.0/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/createError.js:16:1) at settle (/home/rock_u/.nvm/versions/node/v17.6.0/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/settle.js:17:1) at IncomingMessage.handleStreamEnd (/home/rock_u/.nvm/versions/node/v17.6.0/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/adapters/http.js:269:1) at IncomingMessage.emit (node:events:539:35) at endReadableNT (node:internal/streams/readable:1342:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Truffle v5.5.1 (core: 5.5.1) Node v17.6.0
$ curl https://raw.githubusercontent.com/truffle-box/metacoin-box/master/truffle-box.json { "ignore": [ "README.md", ".gitignore" ], "commands": { "Compile contracts": "truffle compile", "Migrate contracts": "truffle migrate", "Test contracts": "truffle test" }, "hooks": { "post-unpack": "" } }
see: https://en.greatfire.org/ for validation
Closing this as issues seem to be related to PROXY configuration. Anyone coming here, please see if the following links help
✓ Preparing to download box
✖ Downloading
Unbox failed!
Error: Truffle Box at URL https://github.com:chainskills/chainskills-box doesn't exist. If you believe this is an error, please contact Truffle support.
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/box/dist/lib/utils/unbox.js:43:1
at Generator.throw (
Hey @Deepthitv, looks like chainskills/chainskills-box doesn't have a truffle-box.json
file at the repo's root, which is what the unbox
command uses to identify if the repo is indeed a Truffle box.
Give our react box a try?
Unbox failed! Error: Error connecting to https://raw.githubusercontent.com/truffle-box/react-box/master/truffle-box.json. Please check your internet connection and try again.
connect ETIMEDOUT 2405:200:1607:2820:41::36:443
at Function.AxiosError.from (C:\Users\tabas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\dist\node\axios.cjs:789:1)
at RedirectableRequest.handleRequestError (C:\Users\tabas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\dist\node\axios.cjs:2744:1)
at RedirectableRequest.emit (node:events:513:28)
at ClientRequest.eventHandlers.
facing this issue is there any solution
For windows (might also work for others)
I have a solution where we don't have to downgrade the node version and truffle-box react
will be up and running. We will go old school.
Now we have to do two major things, first one is to
compile
&migrate
the smart contracts and the next is to install thenpm
dependencies (becausenpm module
doesn't go in a repo. insteadpackage.json
have all the dependencies required written.)
cd truffle
to go inside the truffle folder in your project structure through the command line(Terminal). Now run truffle develop
, and after that run compile
and migrate
one by one, after all these three commands are successfully executed, exit the terminal.cd ..
to get out of the truffle folder and use cd client
to enter inside the client
folder, now run npm install
.npm start
inside the client folder, your truffle-box + react is configured.
USE A VPN
same issue with truffle unbox on ubuntu and win10
Starting unbox...
✔ Preparing to download box ✖ Downloading Unbox failed! ✖ Downloading Unbox failed! Error: Error connecting to https://raw.githubusercontent.com/truffle-box/Metacoin-box/master/truffle-box.json. Please check your internet connection and try again.
Request failed with status code 503 at createError (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/createError.js:16:1) at settle (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/core/settle.js:17:1) at IncomingMessage.handleStreamEnd (/home/linuxbrew/.linuxbrew/lib/node_modules/truffle/build/webpack:/node_modules/axios/lib/adapters/http.js:260:1) at IncomingMessage.emit (node:events:406:35) at endReadableNT (node:internal/streams/readable:1343:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Truffle v5.4.11 (core: 5.4.11) Node v16.9.1
Truffle v5.4.11 (core: 5.4.11) Solidity v0.5.16 (solc-js) Node v16.9.1 Web3.js v1.5.2
FYI. "wget raw.githubusercontent.com" works good on my terminal. and i can git clone.
do you resolved this problem?
how to solve it?
PS C:\Users\shubh\Blockchain\eventtrigger> truffle unbox react
Starting unbox... √ Preparing to download box × Downloading Unbox failed! Error: Error connecting to https://raw.githubusercontent.com/truffle-box/react-box/master/truffle-box.json. Please check your internet connection and try again.
connect ETIMEDOUT 2405:200:1607:2820:41::36:443 at Function.AxiosError.from (C:\Users\shubh\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\dist\node\axios.cjs:789:1) at RedirectableRequest.handleRequestError (C:\Users\shubh\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\axios\dist\node\axios.cjs:2744:1) at RedirectableRequest.emit (node:events:514:28) at ClientRequest.eventHandlers. (C:\Users\shubh\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\follow-redirects\index.js:14:1) at ClientRequest.emit (node:events:514:28) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:514:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at processTicksAndRejections (node:internal/process/task_queues:82:21) Truffle v5.11.2 (core: 5.11.2) Node v18.17.0
Local Environment