Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error read in electron ver > 20.0.0 #7

Closed
kr0n4ik opened this issue Aug 28, 2023 · 3 comments
Closed

Error read in electron ver > 20.0.0 #7

kr0n4ik opened this issue Aug 28, 2023 · 3 comments

Comments

@kr0n4ik
Copy link

kr0n4ik commented Aug 28, 2023

Error - External buffers are not allowed (src\api\FTDI_Device_read.c:55) in electron ver ^20.0.0

@motla
Copy link
Owner

motla commented Aug 28, 2023

Hi @kr0n4ik,
Thanks for your interest on the library.

This is indeed a bug linked to newer versions of Electron.
Official Node-API documentation states:

napi_create_external_arraybuffer
Some runtimes other than Node.js have dropped support for external buffers. On runtimes other than Node.js this method may return napi_no_external_buffers_allowed to indicate that external buffers are not supported. One such runtime is Electron as described in this issue electron/issues/35801.

I will try to investigate what can be done, one idea could be to create the buffer in JavaScript and pass it as an argument to the read function. However I can't look at it before the end of September.

In the meantime you can get back to an older version of Electron, I believe <= 20.3.8 should work fine.

@robertbutz
Copy link

I am using electron and this library and got this error. Thank you for planning to look in to it.

@motla
Copy link
Owner

motla commented Oct 21, 2023

Hi guys, I made a patch v1.3.1 which fixes this issue. It should now work with the latest versions of Electron. Let me know if you still have issues.

@motla motla closed this as completed Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants