maidsafe-archive / safe_examples

examples showcasing various features of the SAFE Network
BSD 3-Clause "New" or "Revised" License
82 stars 50 forks source link

SAFE API Playground Crash #275

Closed josephm1 closed 6 years ago

josephm1 commented 7 years ago

The SAFE API Playground crashes any time you try to choose a file in the NFS Create section. I suspect this might have something to with

 let fileReader = new FileReader();

      fileReader.onload = function(event) {
       let fileBuffer = new Buffer(event.target.result);
       window.fileContent = fileBuffer;
        }

        fileReader.readAsArrayBuffer(event.target.files[0]);
      });   

in the safe_examples/safe_web_api_playground/static/js/init_snippets.js line 62-67 as the Buffer function is not implemented in the current SAFE Browser.

hunterlester commented 7 years ago

@josephm1 Thank you for catching that mistake. Definitely need to switch that to utilize Uint8Array.

The browser crashing, however, is another issue. If you comment out the part that is using new Buffer you'll see that it still crashes.

I started documenting it here: https://maidsafe.atlassian.net/browse/MAID-2257

DaBrown95 commented 7 years ago

I am running into this issue too, macOS 10.13. Can easily reproduce. So it looks like this issue is not unique to a Windows build.

DaBrown95 commented 7 years ago

Just tested under Ubuntu 17.10 and the issue still occurs.

josephm1 commented 6 years ago

Any updates on uploading files with the browser?

hunterlester commented 6 years ago

Beaker and Rotunda community may have been experiencing the same issue. We're sprinting on milestones for the next few weeks but I'd like to test the latest versions of Beaker browser to see if it has been fixed: https://twitter.com/BeakerBrowser/status/930843653400137728

hunterlester commented 6 years ago

At the moment we won't be resolving this issue in SAFE Browser since we'll soon be using the new browser. https://github.com/joshuef/peruse, where it has been completely resolved.