Fetch SAFE demonstrates a simple SAFE app, written in Rust using the Yew framework, deployed as WebAssembly and running in SAFE Browser

@southside

Enter that XOR-URL into the text input of the Fetch SAFE app at the XOR-URL of the FilesContainer of the dist directory and press your enter key.

I don’t observe the error. After it, what does the init line of fetchsafe.js (790 for me) contain?

await init('/fetchsafe.wasm');

is expected.

When I said “looks good” that was before I read the code - or tried to - WASM is totally new to me- so I should see a text box that I put the XOR-URL for

willie@gagarin:~/projects/maidsafe/fetchsafe$ safe files put dist/ --recursive
FilesContainer created at: "safe://hnyynyiceqh3f6jwewfaxiibusdzcyahicsqwg596eijkp61pnsdtk8rwnbnc"
+  dist/fetchsafe.css   safe://hbhyyynsxerinwom7o4w5sya8h3giheusihmkq9setpc6d4jti8r3ghxyw 
+  dist/fetchsafe.js    safe://hbkygydn8qe474xgu646fa8yu5tgkjnwae5iumwkcyhbjts7hqs6jtk95c 
+  dist/fetchsafe.json  safe://hbkygony7b8kajf6i9pan37mxa5ujt9regiqg8o93wqtubk9pi8fintf6f 
+  dist/index.html      safe://hbhybyd6hbjyw888949zzdzqxuuszrcpjcs1ob3g9pxapwgmsncuzwcj7b 

3) Run

  1. Open the XOR-URL of the FilesContainer created when deploying with SAFE Browser
    safe://hnyynyiceqh3f6jwewfaxiibusdzcyahicsqwg596eijkp61pnsdtk8rwnbnc

    no content displayed
    should I see an input field?
  2. Enter the XOR-URL of fetchsafe.json to observe failure
  • dist/fetchsafe.json safe://hbkygony7b8kajf6i9pan37mxa5ujt9regiqg8o93wqtubk9pi8fintf6f

    That looked like success to me, no failure…
    until I read the code…
  1. Enter fetchsafe.json to observe success

not yet…

line 790 of fetchsafe.js

 `   await init('/pkg/fetchsafe_bg.wasm');`

I edited that line and syncd to the shared vault

  • can you see it at ?
    safe://hnyynyiceqh3f6jwewfaxiibusdzcyahicsqwg596eijkp61pnsdtk8rwnbnc

then
safe cat safe://hbkygyn14owrnzwuw4zpi61bdifg3o1a7gbafgzk91orgp5epdwozxwh3m

return wasm;
});
}

    async function main() {
        await init('fetchsafe.wasm');
        run_app();
    }
    main();

    }());

but when I revisit thr Files Container XOR_URL on the browser
safe://hnyynyiceqh3f6jwewfaxiibusdzcyahicsqwg596eijkp61pnsdtk8rwnbnc

I still get a blank page, for each or the versions

1 Like

Should we try to encourage some others to have a try at it with by putting this on the main forum?

1 Like

@southside

What messages does the console contain?

@southside

These projects target developers and as such I don’t believe so.


1 Like

One way to get more developers is to ask punters to help solve problems. I’m no dev, just a guy who likes to test things and report back

1 Like

Indeed Willie, and very helpful it is to have you and others willing to poke around.

1 Like

If you can put up with the daft questions…

1 Like

@southside

Thanks. If you

  1. delete dist
  2. delete pkg
  3. delete the sed -i '' 's/pkg\/fetchsafe_bg.wasm/fetchsafe.wasm/g' $__dir/../dist/fetchsafe.js line from scripts/build-develop
  4. run scripts/build-develop
  5. replace await init('/pkg/fetchsafe_bg.wasm'); with await init('/fetchsafe.wasm'); in dist/fetchsafe.js
  6. run safe files put dist/ --recursive
  7. open the FilesContainer XOR-URL in SAFE Browser v0.16.0-alpha.2

do the results differ?

1 Like

I’ll have a go.
Just opened a beer though…

Drowning your sorrows?

1 Like

I don’t see that line…

@southside

~/projects/maidsafe/hellosafe

It would take the output of several breweries and most distilleries west of the Spey to drown my sorrows at the xenophobic idiocy of your countrymen that dragged me out of the EU…

I have failed miserably to find the Ben Elton clip that should go here - but YKWIM

1 Like

OH FFS… 20 char

1 Like

willie@gagarin:~/projects/maidsafe/fetchsafe$ safe files put dist/ --recursive
FilesContainer created at: “safe://hnyynyi631tnsh8o5o8bfg8jgk461j79yew4hj5nm9awntihxf3d4whcpgbnc”

  • dist/fetchsafe.css safe://hbhyyynsxerinwom7o4w5sya8h3giheusihmkq9setpc6d4jti8r3ghxyw
  • dist/fetchsafe.js safe://hbkygyn14owrnzwuw4zpi61bdifg3o1a7gbafgzk91orgp5epdwozxwh3m
  • dist/fetchsafe.json safe://hbkygony7b8kajf6i9pan37mxa5ujt9regiqg8o93wqtubk9pi8fintf6f
  • dist/fetchsafe.wasm safe://hbyyyyd89nskmwxm5ypiut3bjruw8fns3c87nb5n9yns8k999bcu4nwjcd
  • dist/index.html safe://hbhybyd6hbjyw888949zzdzqxuuszrcpjcs1ob3g9pxapwgmsncuzwcj7b

looking good so far…

Enter the XOR-URL of fetchsafe.json to observe failure


but when I hit enter, nothing happens

1 Like

@southside

That’s the issue I’ve reported. If you instead enter “fetchsafe.json” you’ll see its contents displayed in the console.

1 Like

like this?

I get a panic

1 Like

@southside

Enter fetchsafe.json not "fetchsafe.json".