I just set up a Block Explorer to interact with my private blockchain.
The private Blockchain runs in a VM. The host system connects to the Block explorer (also on VM).
When I have meta mask installed in my Browser the request fails. See image.
When I uninstall Meta Mask the application can get the Blocks from the Blockchain.
VM - Ubuntu 18.04
HOST - Windows 10
This is a very strange behaviour. What exactly is causing this problem? Especially because I dont even interact with meta mask.
EDIT 1: Although it makes no sense I deactived Privacy Mode on Metamask. However it is still NOT working.
EDIT 2: Same behaviour on firefox.
EDIT 3: Steps to reproduce:
Set up a private blockchain.
Configure the explorer on the chains RPC-Port.
Start Blockchain & Explorer.
Now it works.
Now it doesn't work.
EDIT 4: Code line that are most likely to cause the problem with metamask
var web3 = new Web3(); var eth_node_url = 'http://xxx.xxx.xxx.xxx:22000'; web3.setProvider(new web3.providers.HttpProvider(eth_node_url));
However the programm keeps running and crashes at:
var blockNum = $scope.blockNum = parseInt(web3.eth.blockNumber, 10);
Does MetaMask override the web3 instance I created?