Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'number' of null #1

Open
ltfschoen opened this issue Jun 28, 2020 · 3 comments
Open

TypeError: Cannot read property 'number' of null #1

ltfschoen opened this issue Jun 28, 2020 · 3 comments

Comments

@ltfschoen
Copy link
Contributor

ltfschoen commented Jun 28, 2020

After a few moments running the server of my faucet repository, I get the following error, and it occurs on the following line of code, so it has been commented out https://github.com/DataHighway-DHX/faucet/blob/master/helpers/contract.js#L24. That line of code isn't required for the faucet anyway. Potential solution here: MetaMask/web3-provider-engine#313.
Note: This error still happens after commenting out the getBlock code. Since @trufflesuite/web3-provider-engine is a fork of MetaMask/web3-provider-engine I can't create an issue, so might have to switch to ethers.js

/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:219 number: ethUtil.toBuffer(jsonBlock.number), ^ TypeError: Cannot read property 'number' of null at toBufferBlock (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:219:50) at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:60:27 at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:136:12 at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:199:9 at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/async/internal/once.js:12:16 at replenish (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/async/internal/eachOfLimit.js:61:25) at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/async/internal/eachOfLimit.js:71:9 at eachLimit (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/async/eachLimit.js:43:36) at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/async/internal/doLimit.js:9:16 at end (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/index.js:176:5) at /Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/@trufflesuite/web3-provider-engine/subproviders/provider.js:19:5 at XMLHttpRequest.request.onreadystatechange (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/web3-providers-http/src/index.js:96:13) at XMLHttpRequestEventTarget.dispatchEvent (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13) at XMLHttpRequest._setReadyState (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/xhr2-cookies/xml-http-request.ts:219:8) at XMLHttpRequest._onHttpResponseEnd (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/xhr2-cookies/xml-http-request.ts:345:8) at IncomingMessage.<anonymous> (/Users/ls/code/src/DataHighway-com/faucet-mining/node_modules/xhr2-cookies/xml-http-request.ts:311:39)`

ltfschoen added a commit that referenced this issue Jun 28, 2020
@sheenhx
Copy link

sheenhx commented Jun 29, 2020

using parity or myetherwallet will work?

@ltfschoen
Copy link
Contributor Author

@sheenhx I created a PR to fix the dependency here trufflesuite/provider-engine#6

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jun 29, 2020

That fix has been merged by Truffle, I've temporarily increased the version to yarn add @truffle/hdwallet-provider@next in this commit of our master branch f8291e1 so we don't encounter that error which causes the whole faucet to crash.
After their weekly release cycle I'll update to the latest version 1.0.37.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants