Technologies:
Tolerim
2 hours ago
My application is experiencing issues due to the conversion of Buffer to UInt8Array caused by changes in Electron browser versus isolated context.
Answers(1)
Tolerim
2 hours ago
Verified Answer
It sounds like the transition to using preload/isolated context in your Electron app may have affected the type being returned by your code when creating buffers. Instead of returning a 'Buffer' type, you are getting a UInt8Array type, which is causing the Buffer.isBuffer() method to fail.
One solution could be to convert the UInt8Array type to a Buffer type before passing it to the osc-min library. You can do this using the Buffer.from() method. For example:
const myBuffer = Buffer.from(myUInt8Array);
This will create a new buffer from the UInt8Array that you can then pass to the osc-min library.
Alternatively, you may want to consider updating the osc-min library to accept UInt8Array types as input instead of only Buffer types, as it seems to be causing issues in the isolated context of your Electron app.