ProjectOpenSea / opensea-creatures

Example non-fungible collectible, to demonstrate OpenSea integration
https://docs.opensea.io
MIT License
1.17k stars 793 forks source link

Invalid JSON RPC response: " " #91

Open johnnyshankman opened 3 years ago

johnnyshankman commented 3 years ago

Following readme. Able to connect to the test network etc and then suddenly can't deploy the contracts themselves.

I've triple checked that all of my exports are correctly set and that my wallet on the rinkeby network has funds.

± |master ✓| → DEPLOY_CREATURES_SALE=1 yarn truffle deploy --network rinkeby
yarn run v1.22.10
$ /Users/johnlshankman/Documents/workspace/opensea-creatures/node_modules/.bin/truffle deploy --network rinkeby

Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
> Everything is up to date, there is nothing to compile.

Migrations dry-run (simulation)
===============================
> Network name:    'rinkeby-fork'
> Network id:      4
> Block gas limit: 10000000 (0x989680)

1_initial_migrations.js
=======================
Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/web3/node_modules/web3-core-helpers/src/errors.js:42:1)
    at t.InvalidResponse [as onreadystatechange] (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/web3/node_modules/web3-providers-http/src/index.js:92:1)
    at t._a [as dispatchEvent] (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:27:61)
    at t.dispatchEvent [as _setReadyState] (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/xhr2-cookies/dist/xml-http-request.js:208:1)
    at t._setReadyState [as _onHttpRequestError] (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/xhr2-cookies/dist/xml-http-request.js:349:1)
    at ClientRequest._onHttpRequestError (/Users/.../opensea-creatures/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/xhr2-cookies/dist/xml-http-request.js:252:47)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:427:9)
    at TLSSocket.emit (events.js:314: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)
M1T10 commented 3 years ago

Exactly same error

M1T10 commented 3 years ago

I'm not sure about it, but my mistake was to use a wrong node versione (I did yarn install --ignore-engines in order to ignore the versione required). I started from scratch with the correct node version (used nvm to install version 12.18.4) and the mint worked flawlessly

Kehrenkamp commented 3 years ago

I also have a similar problem can someone please help me?

`Summary

Total deployments: 3 Final cost: 0.02640197 ETH

Starting migrations...

Network name: 'live' Network id: 1 Block gas limit: 30058619 (0x1caa87b)

1_initial_migrations.js

Deploying 'Migrations'

transaction hash: 0x4ff20df46929457ca56d9af774eee52fe19605a6688bd8c18adcc541be602c0f ⠏ Blocks: 52 Seconds: 629Error: Invalid JSON RPC response: "\r\n504 Gateway Time-out\r\n\r\n

504 Gateway Time-out

\r\n\r\n\r\n" at Object.InvalidResponse (/Users/Kehrenkamp/Desktop/opensea-creatures-master/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/web3/node_modules/web3-core-helpers/src/errors.js:42:1) at t.InvalidResponse [as onreadystatechange] (/Users/Kehrenkamp/Desktop/opensea-creatures-master/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/web3/node_modules/web3-providers-http/src/index.js:92:1)`

The transaction hash is not displayed on ehterscan.io

vzherebetskyi commented 2 years ago

@johnnyshankman it can be related to the internet connection

also it is mentioned in docs in troubleshooting section that It doesn't deploy anything! _This is often due to the truffle-hdwallet provider not being able to connect. Go to your Alchemy Dashboard (or infura.io) and create a new project. Use your "project ID" as your new ALCHEMYKEY and make sure you export that command-line variable above.