I am trying to run the example from here with mock routing and it seems to be giving back empty data. The size example shows the correct size of the data. I removed the call to toString and you can see it is an empty array buffer. I was expecting the string my immutable data. Can anyone else verify?
// Read data from an ImmutableData:
.then((idWriterHandle) => window.safeImmutableData.write(idWriterHandle, 'my immutable data')
.then(_ => window.safeCipherOpt.newPlainText(appHandle)
.then((cipherOptHandle) => window.safeImmutableData.closeWriter(idWriterHandle, cipherOptHandle))
.then((addr) => window.safeImmutableData.fetch(appHandle, addr))
.then((idReaderHandle) => window.safeImmutableData.read(idReaderHandle))
.then((data) => console.log('ImmutableData data read: ', data));
I don’t have time to examine in detail, so this may be off, but it reminds me of when I first tried reading data.
The issue, from memory (so beware ), was that the returned data was an ArrayBuffer (I think) and that I needed to access it using something else - an ArrayBufferView (or something like that). Anyway, maybe enough hints there for you to tell if this is where to look!?