I am trying to build a simple Dapp. Tested already in local testnet (test rpc), next wanted to test it in rinkeby.
Since I used web3 in server side, unable to capture injected web3 from metamask, so I am trying to use infura api. It is able to get the contract details, but fails with an event that too with error "Invalid JSON Response".
Here is the route.js code I am trying to connnect to infura https://gist.github.com/parthi2929/7af62a5e24576864146db2d9d5379a61
Please find the rest of project files here (working with testrpc) https://github.com/parthi2929/my-second-dapp
- Why the event fires in first place (as per contract should fire only when setInstructor called).
- Why event has error response (Invalid JSON response).
Note: Some people might ask to deploy geth to load rinkeby blockchain and connect to that, but the point is, I want to avoid running localhost and test it. That is why trying infura api which is supposed to have all blockchain data, and it also seem to have as it could get my account balance and contract info properly. Somewhere in event handling we are failing.