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

Error accessing accounts #1247

Closed
ToJen opened this issue Dec 23, 2017 · 2 comments
Closed

Error accessing accounts #1247

ToJen opened this issue Dec 23, 2017 · 2 comments

Comments

@ToJen
Copy link
Contributor

ToJen commented Dec 23, 2017

Versions
Node: v9.3.0
npm: 5.6.0
[email protected]

Problem
I'm following the Voting dApp tutorial which is pre web3v1.0.

I'm unable to get any accounts from web3. I have testrpc running on a separate terminal. In the current terminal, I opened node and created the Web3 and web3 variables correctly. When I run web3.eth.accounts[0], I get back undefined. Yes I can see the 10 testrpc accounts when I run web3.eth.getAccounts().then(console.log) but I would like to have the account set automatically.

This also seems to affect any contract I create as myContract.options.address always returns null.

Any idea what's wrong?

@ToJen
Copy link
Contributor Author

ToJen commented Dec 23, 2017

@frozeman it seems like v1.0 has an issue with returning addresses

@mjhm
Copy link
Contributor

mjhm commented Dec 27, 2017

@ToJen Here's my port of that tutorial to web3 1.0.0-beta.27 https://github.com/mjhm/hello_world_dapp

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