trufflesuite / truffle-migrate

On-chain migrations management
17 stars 17 forks source link

Error: Invalid JSON RPC response: 502 Bad Gateway #36

Closed tombenj closed 3 years ago

tombenj commented 3 years ago

Using latest master.

Truffle v5.1.48 (core: 5.1.48) Node v12.18.4

Command: DEPLOY_ACCESSORIES_SALE=1 yarn truffle migrate --network rinkeby

  Deploying 'CreatureAccessoryFactory'
   ------------------------------------
   > transaction hash:    0x437aa3516819e2af379665e9b8fa6ab03ff33b64de38a3d76555992c313951ef
   > Blocks: 1            Seconds: 9
   > contract address:    0xE218634e4758b9cC38C9A80f5017efbb2Fa27680
   > block number:        8325238
   > block timestamp:     1617112072
   > account:             0x33dFd54B5cD88d2f5def394012c78C56Fc549a8B
   > balance:             2.26147138
   > gas used:            1806673 (0x1b9151)
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.03613346 ETH

Error: Invalid JSON RPC response: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n</body>\r\n</html>\r\n"
    at Object.InvalidResponse (/Users/go/keys/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 e.InvalidResponse [as onreadystatechange] (/Users/go/keys/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 e._a [as dispatchEvent] (/Users/go/keys/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 e.dispatchEvent [as _setReadyState] (/Users/go/keys/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 e._setReadyState [as _onHttpResponseEnd] (/Users/go/keys/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:318:1)
    at IncomingMessage._onHttpResponseEnd (/Users/go/keys/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:289:47)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
mlprodigy2010 commented 3 years ago

@tombenj what was your solution

mackbdev commented 3 years ago

@tombenj what was your solution

The solution for me was updating the RPC url in the truffle config. For some reason the mainnet link I had for BSC was down and had to use an alternate link.