{"action":"created","issue":{"url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/679","repository_url":"https://api.github.com/repos/MetaMask/metamask-plugin","labels_url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/679/labels{/name}","comments_url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/679/comments","events_url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/679/events","html_url":"https://github.com/MetaMask/metamask-plugin/issues/679","id":178102564,"number":679,"title":"Invalid Params at Object.Invalid response on code that was working before update","user":{"login":"stuffyvater","id":11940919,"avatar_url":"https://avatars.githubusercontent.com/u/11940919?v=3","gravatar_id":"","url":"https://api.github.com/users/stuffyvater","html_url":"https://github.com/stuffyvater","followers_url":"https://api.github.com/users/stuffyvater/followers","following_url":"https://api.github.com/users/stuffyvater/following{/other_user}","gists_url":"https://api.github.com/users/stuffyvater/gists{/gist_id}","starred_url":"https://api.github.com/users/stuffyvater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuffyvater/subscriptions","organizations_url":"https://api.github.com/users/stuffyvater/orgs","repos_url":"https://api.github.com/users/stuffyvater/repos","events_url":"https://api.github.com/users/stuffyvater/events{/privacy}","received_events_url":"https://api.github.com/users/stuffyvater/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-20T15:59:44Z","updated_at":"2016-09-20T22:35:03Z","closed_at":null,"body":"Hi I'm working with a prototype with a friend and we had a working prototype 3 days ago before 2.13 but are now both getting this error message when launching our contract: \r\n\r\nError Message: \r\n![errormm1](https://cloud.githubusercontent.com/assets/11940919/18678201/8de0eeb2-7f5b-11e6-8f69-a6f218b9d5a5.png)\r\n\r\nCode that worked 3 days ago \r\n![errormm2](https://cloud.githubusercontent.com/assets/11940919/18678202/8de135a2-7f5b-11e6-93b1-389928014d19.png)\r\n\r\n\r\nl:31 :   $('#yay').html(\"Yay. Hash is: \"+r.transactionHash);\r\n\r\ndid something change with the update? Thanks in advance! \r\n"},"comment":{"url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/comments/248455730","html_url":"https://github.com/MetaMask/metamask-plugin/issues/679#issuecomment-248455730","issue_url":"https://api.github.com/repos/MetaMask/metamask-plugin/issues/679","id":248455730,"user":{"login":"stuffyvater","id":11940919,"avatar_url":"https://avatars.githubusercontent.com/u/11940919?v=3","gravatar_id":"","url":"https://api.github.com/users/stuffyvater","html_url":"https://github.com/stuffyvater","followers_url":"https://api.github.com/users/stuffyvater/followers","following_url":"https://api.github.com/users/stuffyvater/following{/other_user}","gists_url":"https://api.github.com/users/stuffyvater/gists{/gist_id}","starred_url":"https://api.github.com/users/stuffyvater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuffyvater/subscriptions","organizations_url":"https://api.github.com/users/stuffyvater/orgs","repos_url":"https://api.github.com/users/stuffyvater/repos","events_url":"https://api.github.com/users/stuffyvater/events{/privacy}","received_events_url":"https://api.github.com/users/stuffyvater/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T22:35:03Z","updated_at":"2016-09-20T22:35:03Z","body":"Hi thanks for the swift reply and this amazing plugin - No secrets here, this is for a master thesis :-) Here's the code. As indicated in screenshot 2 from my first post the problem starts here\r\nl:31 : `$('#yay').html(\"Yay. Hash is: \"+r.transactionHash);`\r\n\r\nfull code: \r\n`<html>\r\n  <head>\r\n  </head>\r\n    <script type=\"application/javascript\" src=\"./bower_components/jquery/dist/jquery.min.js\"></script>\r\n    <script src=\"https://npmcdn.com/ipfs-api/dist/index.js\"></script>\r\n  <body>\r\n    <h2>Create a Contract!</h2>\r\n    <button id=\"create\">Create!</button>\r\n    <div id=\"yay\"></div>\r\n    <br/>\r\n    <hr>\r\n    <h2>Whitelist a Stakeholder</h2>\r\n    Contract Address: <input type=\"text\" id=\"contractAddress\"/><br/>\r\n    Stakeholder ID: <input type=\"text\" id=\"stakeholderId\"/>\r\n    <button id=\"submit\">Go!</button>\r\n    <div id=\"yay2\"></div>\r\n    <hr>\r\n    <h2>Upload/Amend Document</h2>\r\n    Contract Address: <input type=\"text\" id=\"contractAddress1\"/><br/>\r\n    File: <input type=\"file\" id=\"file\"/>\r\n    <button id=\"submit1\">Go!</button>\r\n  <script type=\"text/javascript\">\r\n    $(document).ready(function() {\r\n      var abi = [{\"constant\":false,\"inputs\":[{\"name\":\"stakeholder\",\"type\":\"address\"}],\"name\":\"whitelistStakeholder\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"whiteList\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"documentId\",\"type\":\"uint256\"},{\"name\":\"newFingerprint\",\"type\":\"string\"}],\"name\":\"amendDocument\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"documents\",\"outputs\":[{\"name\":\"author\",\"type\":\"address\"},{\"name\":\"fingerprint\",\"type\":\"string\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"stakeholder\",\"type\":\"address\"}],\"name\":\"StakeholderWhitelisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"documentId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"author\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newFingerprint\",\"type\":\"string\"}],\"name\":\"DocumentAmended\",\"type\":\"event\"}];\r\n      /* VARIABLES */\r\n      var MyContract = web3.eth.contract(abi);\r\n      $('#create').click(function() {\r\n        var c = MyContract.new({from: web3.eth.coinbase, gas: 300000}, function(e,r) {\r\n          console.log(e);\r\n          console.log(r);\r\n          $('#yay').html(\"Yay. Hash is: \"+r.transactionHash);\r\n        });\r\n      })\r\n\r\n      $('#submit').click(function() {\r\n        var contractAddress = $('#contractAddress').val();\r\n        var stakeholder = $('#stakeholderId').val();\r\n        var myContractInstance = MyContract.at(contractAddress);\r\n        console.log(myContractInstance);\r\n        console.log(contractAddress);\r\n        myContractInstance.whitelistStakeholder(stakeholder, {from: web3.eth.coinbase, gas: 91000}, function(e,r) {\r\n          console.log(e);\r\n          console.log(r);\r\n          if (!e) {\r\n            $('#yay2').html('Stakeholder whitelisted');\r\n          }\r\n        });\r\n      });\r\n\r\n      $('#submit1').click(function() {\r\n        var files = document.getElementById('file').files;\r\n        if (!files.length) {\r\n            alert('Please select a file!');\r\n            return;\r\n        }\r\n\r\n        var file = files[0];\r\n        var reader = new FileReader();\r\n\r\n        reader.readAsText(file);\r\n        // If we use onloadend, we need to check the readyState.\r\n        reader.onloadend = function(evt) {\r\n            var i = IpfsApi(\"/ip4/127.0.0.1/tcp/5001\");\r\n            i.add(i.Buffer(reader.result), function (err, res){\r\n                if(err || !res)\r\n                  return console.error(\"ipfs add error\", err, res);\r\n\r\n                var storedDoc = res[0];\r\n                var fingerprint = storedDoc.hash;\r\n\r\n                $(\"#hashResult\").show();\r\n                $(\"#hashResult\").html(fingerprint);\r\n                console.log(\"fingerprint: \"+ fingerprint);\r\n                contract = web3.eth.contract(abi);\r\n\r\n                var contractAddress = $(\"#contractAddress1\").val();\r\n                evt.preventDefault();\r\n                var contractInstance = contract.at(contractAddress);\r\n\r\n                contractInstance.amendDocument(1234, fingerprint, {from: web3.eth.coinbase, gas: 1000000}, function(e,r){\r\n                  if(e){\r\n                      alert(\"An error occurred: \" + e);\r\n                  }\r\n                  else {\r\n                      if(r){\r\n                          console.log(\"The document has been uploaded (fingerprint: \" + fingerprint + \")\");\r\n                      }\r\n                      console.log(r);\r\n                  }\r\n                });\r\n            });\r\n        };\r\n      })\r\n    });\r\n  </script>\r\n  </body>\r\n</html>\r\n`\r\n\r\n"}}
{"actor":{"display_login":"stuffyvater"}}