title: Ganache-cli server and Webjs not connecting
body: <p>I am trying to connect web3js in the javascript section of my html to my ganache-cli nodejs server</p>
  <p>ganache deployment script:</p>
  <pre><code>const ganache = require(&quot;ganache-cli&quot;);
  const Web3 = require(&quot;web3&quot;);
  const web3 = new Web3(ganache.provider());
  
  const { interface, bytecode } = require(&quot;./compile&quot;);
  
  const deploy = async () =&gt; {
    const accounts = await web3.eth.getAccounts();
  
    const result = await new web3.eth.Contract(JSON.parse(interface))
      .deploy({
        data: bytecode,
        arguments: [&quot;test&quot;],
      })
      .send({ from: accounts[0], gas: &quot;1000000&quot; });
  
    console.log(`Contract address: ${result.options.address}`);
  
  };
  
  var server = ganache.server();
  
  server.listen(8545, function (err, blockchain) {
    console.log(server);
    console.log(&quot; live at port 8545&quot;);
  });
  
  deploy();
  </code></pre>
  <p>my frontend html/js file</p>
  <pre><code>if (typeof web3 !== 'undefined') {
              web3 = new Web3(web3.currentProvider);
          } else {
          web3 = new Web3(new Web3.providers.HttpProvider(&quot;http://127.0.0.1:8545&quot;));
        
          web3.eth.defaultAccount = web3.eth.accounts[0];
          var info = new web3.eth.Contract(
             JSON.parse(interface), '0xeD9a9f326F38223a6599309F7201562DfB177997');
          
          
          console.log(info.methods.GetInfo(&quot;test&quot;).call());
  
      }
  </code></pre>
  <p>But I get the following error:</p>
  <pre><code>index.js:297 Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
  </code></pre>
  <p>solidty code:</p>
  <pre><code>pragma solidity ^0.4.17;
  
  pragma experimental ABIEncoderV2;
  
  contract DVA {
     struct Info {
          // uint Age;
          // bool AgeRestriction;
  
          string DO_Num;
          string date;
          string time;
          string status;
          string otherstatus;
  
          string imagehash;
          string imagename;
  
      }
      mapping (string =&gt; Info[]) AllInfo;
  
      function SetInfo(string _DO, string _date, string _time, string _status, string _otherstatus, string _imagehash, string _imagename) public {
  
           Info memory info = Info(_DO,_date,_time,_status,_otherstatus,_imagehash,_imagename); 
        
          AllInfo[_DO].push(info);
        
         }
    
  
     function GetInfo(string _DO) public view returns (string memory) {
          // return (AllInfo[_DO].status,AllInfo[_DO].time);
                  return &quot;hi&quot;;
  
      }   
  }
  </code></pre>
  <p>The code above is the contract code.
  The weird thing is, I can call SetInfo but not GetInfo. I have ensured the contract address is valid, and that the ABI is correct as well. In fact, the ABI is retrieved directly upon each compilation of the solidty code as well.</p>