Open lukasrakauskas opened 1 month ago
Thanks for reporting this @lukasrakauskas. I'm going to be honest with you here, our company doesn't have the bandwidth to fix this atm, we're focusing on other aspects of our product development that does not involve electron atm. If you can send over a PR, we can validate it works and accept.
Describe the bug
Electron has dropped support for external buffers. Thus some methods that this quic library uses are not working in such environment.
To Reproduce
I've made a reproduce repo. To reproduce pull it run
npm install
andnpm run start
https://github.com/lukasrakauskas/electron-js-quic-reproduceExpected behavior
QUIC client should be able to connect to a server, read and write to streams when created within electron.
Platform
OS: macOS Sonoma 14.5
Possible fix
The failing point is reading source ID in javascript, converting Uint8array to external vec seems to solve the external array buffer problem.
After this, the js fails to read header dcid property that also is Uint8array. To solve this, I've added get_dcid method to Header struct to be used instead of reading dcid directly.
Finally the library started to work for my use case