Closed mlecoq closed 1 year ago
To precise, it appears not on every reload, just when there is an issue in last edited code
I close it, I am no more able to reproduce it
@mlecoq I also reproduce it.
I'm seeing this problem too, so far only tested on iOS 16.4 - iPhone XR and iPad Simulator. If code is hot reloaded the app is reloaded (either by pressing r in terminal or because it can't hot reload), I get this error until I force quit the app and reopen, at which point all is good in the world until the next reload. Makes using this library while developing pretty painful.
Here's my code:
const blob = await fetch(url).then(r => r.blob());
const arrayBuffer = getArrayBufferForBlob(blob);
// error here
@mrousavy can this be reopened please? I'll knock up a minimal repro in the meantime.
@alexstanbury waiting for your repro !
I realised it doesn't happen when hot reloading code, but does when app full reloads.
Repro here: https://github.com/alexstanbury/BlobJsiRepro
Love the reproduction steps 😄 thank you so much for providing a reproduction 😊
Thanks for the repro! Can you throw a breakpoint there in Xcode and step through one by one and let me know in which line it fails?
Hopefully this screenshot helps a bit, this seems to be the exact place it's dying. This is a blocker for me as I'm pretty sure I'm gonna run into this issue when the app gets reloaded after a code push update.
Ah hold on I got a fix
Confirming fix works, thank you! 🍻
Hi,
during my development I have a strange issue after hot reloading (on Android - with hermes) on calling
getArrayBufferForBlob
:Value is undefined, expected an object
I have to restart metro after any code change