Version: `0.9.0`
I'm trying to get accounts async:
web3.eth.getAccounts(function(error, result) {
if(error != null)
console.log("Couldn't get accounts');
console.log(result[0])
});
I'm getting the next error in the console:
app.js:5178 Uncaught TypeError: bytes.substr is not a function
SolidityType.decode @ app.js:5178(anonymous function) @ app.js:17889SolidityCoder.decodeParams @ app.js:17888SolidityFunction.unpackOutput @ app.js:41043(anonymous function) @ app.js:41071(anonymous function) @ app.js:7099(anonymous function) @ app.js:42371(anonymous function) @ VM92:665
UPDATE:
Okay, acutally the problem was from
web3.version.getNetwork(function (error, network) {
});
But now when I'm trying to call
web3.eth.getAccounts(function(error, result) {
if(error != null)
console.log("Couldn't get accounts');
console.log(result[0])
});
I get as a result something like:
console: 1
Or for result[1]
console: 5
I expected to get an account address..
I have the same problem
getAccounts still doesn't return accounts in 0.9.3
It seems I needed to use "connect accounts" button appearing when I hover browser's favicon in the left pannel of Mist browser window.
At least, that works with web3.js 1.0.0-beta28.
console.log("Couldn't get accounts');
You are opening it with a double quotes and closing it with a single quotes. 馃槈
Tested this and it works:
web3.eth.getAccounts(function(err, res){ console.log(res); });
@alexvandesande Can you please tell the version of web3 you're using? I'm trying to access my rinkeby accounts with the help of infura, but still end up getting empty array ( [] ).
This still appears to be an issue in 0.10.0:

I think this issue ought to be reopened.
Edit: As @Pipeliner mentioned, you have to use the "connect" button in the top right of the window...I guess I don't know how to use this browser properly.
I connected it, but still []
Most helpful comment
You are opening it with a double quotes and closing it with a single quotes. 馃槈
Tested this and it works: