-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging Guide
Constance Shi edited this page Dec 11, 2020
·
9 revisions
Error:
Returned values aren't valid, did it run Out of Gas?
Solution:
- Make sure the
USDC_CONTRACT_ADDRESSin your.envfile matches the network in the Metamask extension. For example, if Metamask is set to Ropsten thenUSDC_CONTRACT_ADDRESSshould be the address for the USDC contract on Ropsten (and the same for mainnet). A future solution for this could be to programmatically set the Metamask network.
Metamask Error:
Error in contract code
Solution:
- Try lowering the gas price
- Check that the balance of USDC in the accounts is greater than the amount you are trying to transfer/burn if applicable
- Check that the amount you are trying to mint is lower than the minter allowance if applicable
Metamask Error:
Transaction failed
Solution:
- Verify that the contract is not paused
- Verify that the address performing the transaction is not blacklisted and has the correct permissions
Error:
/accounts or /transactions page loads infinitely
Solution:
- These pages take a bit longer to load (30 seconds to two minutes on mainnet) due to many transactions and accounts. This is due to web3 limitations with traversing many blocks to find the most recent 10k transactions/accounts, and then any additional processing like fetching the corresponding ages in parallel. This could potentially be improved with indexers like Google BigQuery in the future, but BigQuery also does not support Ethereum Ropsten or many other chains.
- If the page still doesn't load after a few minutes, try refreshing the page.
Error:
Unexpected end of JSON or other JSON errors
Solution:
-
npm updateso that all modules, especially algosdk, are installed - if the above still doesn't work, run
rm -rf node_modulesornpm uninstall *and then reinstall withnpm ci - Ensure you in .env: GOOGLE_APPLICATION_CREDENTIALS (if using Ethereum), and PURESTAKE_API_KEY (if using Algorand) (USDC_CONTRACT_ADDRESS is optional but adding it can ensure the correct network such as mainnet, ropsten, etc)
- Ensure you have the correct and complete google-credentials.json file