2
Ben
Ben

Not getting 10-block output when using swarm.

At about the 5min mark in the video, I successfully uploaded the index.html file to the local swarm node and got the hash back.  On Firefox, I navigated to the localhost:8500/bzz:/hash and the “headers” printed successfully.  However, the 10-block output did not.  It’s running successfully using the previous lesson’s localhost:3000 (when displaying using ‘lite-server’ and the same index.html file).

Do you have any suggestions regarding the missing output?  Thanks.

Best answer

Jack Wu
Jack Wu

It should work, try replacing the script tag link of web3.min.js to a https cdn link of the file or you can upload the web3.min.js file together with the index.html to swarm. 

Answers

  1. 2
    Ben
    Ben

    Got it working, but had to play with a number of uploads of the web3.min.js.  They changed things in web3.min.js after the 1.0.0 version and you need to make sure to either 1) get the version you used in the video, or 2) be prepared to modify some of the function calls to the newer names (like toBigNumber() that’s been cahnged to toBN()).