You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Electron has dropped support for external buffers. Thus some methods that this quic library uses are not working in such environment.
Error: Create external arraybuffer failed
at get connectionId (/Users/lukas.rakauskas/dev/electron-js-quic-reproduce/node_modules/@matrixai/quic/dist/QUICConnection.js:326:36)
at QUICClient.createQUICClient (/Users/lukas.rakauskas/dev/electron-js-quic-reproduce/node_modules/@matrixai/quic/dist/QUICClient.js:148:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'Unknown'
}
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.
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-reproduce
Expected behavior
QUIC client should be able to connect to a server, read and write to streams when created within electron.
Platform
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
The text was updated successfully, but these errors were encountered: