4

I've just uploaded through my Swarm node a very straightforward AngularJs app (index.html, app.css, app.js and lib.js) using this command:

$ swarm --recursive --defaultpath /home/gjeanmart/workspace/app/build/index.html up /home/gjeanmart/workspace/app/build

I0131 22:57:16.586296 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/index.html (747 bytes) and adding path
I0131 22:57:16.589043 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/app.css (115 bytes) and adding path app.css
I0131 22:57:16.602917 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/index.html (747 bytes) and adding path index.html
I0131 22:57:16.603232 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/lib.css (121202 bytes) and adding path lib.css
I0131 22:57:16.604320 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/lib.js (499417 bytes) and adding path lib.js
I0131 22:57:16.607676 upload.go:195] uploading file /home/gjeanmart/workspace/app/build/views/home.html (124 bytes) and adding path views/home.html
c9af459be737fa8d10aac633fbab05f045d5e20741399b6f6d9fc65bc6ab6d42

When I try to retrieve it through my local Swarm node [http://x.x.x.x:8500/bzz:/c9af459be737fa8d10aac633fbab05f045d5e20741399b6f6d9fc65bc6ab6d42], it works perfectly fine.

But through the swarm-gateway.net [http://swarm-gateways.net/bzz:/c9af459be737fa8d10aac633fbab05f045d5e20741399b6f6d9fc65bc6ab6d42/#!/home], it seems very unstable, sometime, I got an HTTP 400 Bad Request, sometime HTTP 404 Not Found or FAILED, INCOMPLETE CHUNK ENCODING.

enter image description here

3

The Not Found or FAILED, INCOMPLETE CHUNK ENCODING errors mean that the data was no available on the swarm node sitting at the gateway.

Usually this means that syncing has not completed and the chunks of data have not spread through the swarm as far as they should. The best thing to do is stay connected and wait.

Of course it will work from your local node. When you 'upload', you are copying the data to your local node only. From that moment on, the syncing process is responsible for propagating the data to other nodes (including our swarm-gateway). If you shut down your node before the process completes, your data will not be available on other nodes.

These days we are having more delays than usual. We've been having performance issues with the gateway cluster and are setting up a newer, bigger, better one.

Please stay connected, and try again after some time. If it still doesn't work, report back.

aron.

  • Thank you very much for your answer. Indeed, I might have shutdown my node too soon but do you have any idea how long approximately it takes (or could take on LIVE) to synchronize a bunch of files ? – Greg Jeanmart Feb 1 '17 at 19:17
  • How long it takes depends strongly on the connections you have with your peers. At the moment we don't have a way of telling if your sync has completed. There is however a trick: while you're still connected, you load the page on the gateway. In a sense, this will try to "pull" the data there. As soon as it works on the gateway, you can be sure that the data is out there. – cobordism Feb 1 '17 at 22:17
  • OK Thanks for your answer ans thanks for your work, early days but awesome. – Greg Jeanmart Feb 1 '17 at 22:39
1

When I clicked on your swarm-gateways link, I have this following errors: enter image description here A little search on stack overflow with the following error "was blocked due to MIME type mismatch (X-Content-Type-Options:nosniff)", and I found this: your URL might be bad.

  • the MIME-type mismatch is probably a different problem. I've found that the uploader tags .js and .css files as text/plain and some browsers complain while others do not. – cobordism Feb 1 '17 at 18:32
  • Thanks FrenchieiSverige, but that's the point, the mimetype should be correct. I actually noticed later on that my manifest was incorrect, but when I upload a file, the mimetype should be guess by swarm (.js = application/javascript) ? Otherwise, how could i specify the mimetype ? – Greg Jeanmart Feb 1 '17 at 19:19
  • manifest manipulation tools are in the works. For now please wait, (or change the manifest by hand and upload with bzz.put) – cobordism Feb 1 '17 at 22:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.