Skip to content

Error Index

Tara Miwa Tritt edited this page Jun 2, 2018 · 13 revisions

Node

If you have issues while running npm install with errors relating to node.gyp:

  1. Try removing the ~./node-gyp folder
  2. Run npm update
  3. Run npm rebuild

MetaMask

Make sure that whenever you need to use MetaMask, that it's unlocked. MetaMask will lock your account after a certain period of disuse and ask for your password before you can use it again.


Transaction nonce is too low

Open MetaMask and select a different network from the top left hand corner. Then switch back to your desired network, for example Rinkeby Test Net. Found here


Gas limit is set dangerously high. Approving this transaction is likely to fail

While developing your DApp you may see this error while trying to submit a transaction through MetaMask. MetaMask displays this message, because it has the ability to simulate the execution of the function you are trying to call and if it simulates that the function execution fails, due to any number of reasons (i.e. maybe you do not meet the conditions to fulfill a require statement), then it will display this error. Check your code if you think that it should succeed to make sure you are meeting all the conditions to call that function.


Remix

If you are having trouble sending transactions through Remix when using the Injected Web3 option, your MetaMask account could be locked. Unlock your account then refresh Remix.


ethereum/deploy.js

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: The contract code couldn't be stored, please check your gas limit.

Increase the <gasLimit> in ethereum/deploy.js, but stop to consider why your contract may be using so much gas

  .deploy({ data: compiledContract.bytecode })
    .send({ gas: "<gasLimit>", from: accounts[0] });

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!

Try running the deploy.js again, the network may be congested. This is known to be an intermittent issue with web3.js


Web3

Issue while installing windows-build-tools and web3 under Windows

To install the windows build tools you have two options:

Note: If you already tried to install the build tools with no success (via npm command) it is probably a good idea to delete everything before applying option 1 or 2. You can find the build tools here and just delete the folders (but I don't know if they are installed somewhere else):

  • C:\Users'yourUser'.windows-build-tools\

  • C:\Users'yourUser'\AppData\Roaming\npm\node_modules\windows-build-tools

Option 1 (described here: https://github.com/nodejs/node-gyp):

Note: Open cmd or Powershell as admin!!!

  • install node-gyp: npm install -g node-gyp

  • download and install build tools manually (http://landinghub.visualstudio.com/visual-cpp-build-tools)

  • install Python 2.7

  • register msvs-version to npm: npm config set msvs_version 2015

  • register python-executable to npm: npm config set python python\path\to\executable (Note: The path should point directly to python.exe --> this was my mistake as I was always pointing to the folder where executable is located like for the Env-Path but here it needs directly the executable)

For Option 2:

Option 2 is based on the fact that it seems that the windows build tools are kind of buggy in version 1.4.0. This explains while some people are waiting over hours for the installation to be finished and even then it seems that sometimes they are not installed properly (as in my case).

Option 2 (RECOMMENDED):

Note: Open cmd or Powershell in admin-mode

  • install version 1.3.2 of windows build tools directly with the python-path flag (the --debug flag isn't necessary): npm --add-python-to-path='true' --debug install --global --production windows-build-tools

  • just to be sure that npm pointing correctly to python: npm config set python python\path\to\executable (as described above)

Note: While using the npm-way to install the build tools, Python is installed here c:\Users'yourUser'.windows-build-tools\python27 (just that you an find the executable :) )

After using Option 1 or 2 you should be able to install web3 properly. As stated several times, make sure that you are in the project folder since this is a project dependent installation.

npm install --save-dev [email protected]

Clone this wiki locally