Unable to load file in SAFE Browser which exists in `safe cat ...`

I have synchronised a previously uploaded directory recursively to the shared vault network using the following command:

safe files sync "../www.phantom/public" "safe://shaneblahblah4" --update-nrs --recursive

This command executes as expected and gives the following result (The index.php was already uploaded in a previous version):

FilesContainer synced up (version 4): "safe://shaneblahblah4"
+  ../www.phantom/public/build/bundle.css      safe://hbhyyyngbcysurp13pon7p45wp55fz33b1pke56ofh9ngkgfu1bt8ins3t
+  ../www.phantom/public/build/bundle.css.map  safe://hbhydydxs4xym6daqdw9depr4x3g8g4ahnqgo44qgn3src1x8sojae4jer
+  ../www.phantom/public/build/bundle.js       safe://hbkygynjkdckfw7ghcetd58348t75draai5qo1em38w7xmxqwdijxqkhba
+  ../www.phantom/public/build/bundle.js.map   safe://hbhydyddaxbpxxgcy1aspdy4bh81h1m1ws4tdy1akzeu4drrhbcpkshchu

However, when I try to load the page safe://shaneblahblah4 , the index.html loads but the build/bundle.js file fails to load.

The file shows in the directory listing safe://shaneblahblah4/build:


However, the actual bundle.js file fails to load:

Even with the cache disabled, I am unable to get the file to load (it says it’s being loaded from the disk cache, I’m going to assume this is because the safenet API is acting as middleware for the request so it will say it’s being served from the disk cache regardless):

It’s possible this is a cache issue, but if so I’ve been unable to debug it, I’ve tried clearing it in the Developer Tools => Application => Clear Storage window.

Running the following command in my CLI works as expected:

safe cat safe://hbkygynjkdckfw7ghcetd58348t75draai5qo1em38w7xmxqwdijxqkhba

The output is the expected bundle.js content:

.......(t),o.c()),q(o,1),o.m(n,null))},i(t){r||(q(o),r=!0)},o(t){C(o),r=!1},d(t){t&&f(n),c[e].d()}}}function Z(t,n,e){let o;return i(t,U,t=>e(0,o=t)),[o]}return new class extends R{constructor(t){super(),T(this,t,Z,Y,s,{})}}({target:document.body,props:{name:"world"}})}();
//# sourceMappingURL=bundle.js.map

So the bug seems to be isolated to my SAFE Browser. I am running version 0.15.4, installed on Windows 10 through the SAFE Network App version downloaded from here: https://github.com/maidsafe/safe-network-app/releases/tag/v0.0.5


I just tried with browser latest version (v0.16.0-alpha.2) and it seems to work fine:


@bochaco in that case, it must be a cache issue with the browser. I still get the 404 in the browser (and only the browser) as of this morning:

I’ll try the latest beta of the browser - which will fix the immediate problem as I’ll have a brand new cache - but I’ll let you know if the problem recurs.

My use case at the moment is quite simple, I’m just synching code up to a FileContainer with the --update-nrs flag set/

This sounds like the issues I was getting when I tried dweb blog on the shared vault.

The issues were not resolved for me either, so I assumed it was bugs in the early Maidsafe code and have left it while I worked on other things.

I’m not sure why caching would cause 404 issues but it sounds like this might be a general problem. I was planning to give it another test soon, but I’m glad Shane got here first as it shows it is probably not a problem with my site.

1 Like

@shane @happybeing It may be related to how we were resolving the urls (depending on the setup in your html file). There was a bug with that in safe-api which was fixed, and the newer browser version has this fix


I haven’t been able to recreate this specific bug in the latest version using the same user journey. I popped back on to the old version and was able to recreate it, so it looks resolved to me. Cheers!


This is great - I’ll bump my task to update the dWeb Blog deployment script for the shared vault and CLI (it currently assumes alpha 2/SAFE Drive) and test it out with a couple of new posts.

This topic was automatically closed after 60 days. New replies are no longer allowed.