On line 33717 of Web3's app.js file (in the /build folder of a truffle project) there's the following line:

})[0] || {};

However, somehow this turns into the following when app.js runs when my app is first loaded:

})[0] || {};

This causes a syntax error. This is a known bug: https://github.com/ethereum/web3.js/issues/555 (apparently some kind of encoding issue)

How could this be fixed in the simplest way possible? I've tried (naively) copying and pasting the line into notepad and back into app.js but it does nothing.

  • The bug looks like it's fixed, but not necessarily included in the pre-compiled version. If you have the know-how (and are using a development environment that has everything you need), the easiest solution is use git to download the latest version of the software and build it from source. – lungj Jul 21 '17 at 13:56
  • I'd be unsure how to do that – ZhouW Jul 21 '17 at 14:09
  • What operating system are you using? Edit: Oh... I see... there are nice build instructions for all major operating systems now! github.com/ethereum/go-ethereum/wiki/Building-Ethereum – lungj Jul 21 '17 at 14:12
  • I'm using Windows 10 – ZhouW Jul 21 '17 at 14:13
  • If you follow the instructions in the link in my edit, you should end up with the latest version of geth and friends. Hopefully your issue will be resolved with that version. – lungj Jul 21 '17 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.