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

[Bug]: Fatal error in V8: v8 ArrayBuffer NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox. #37790

Closed
3 tasks done
pablohpsilva-forjnetwork opened this issue Apr 1, 2023 · 1 comment
Labels

Comments

@pablohpsilva-forjnetwork

Preflight Checklist

Electron Version

23.2.1

What operating system are you using?

macOS

Operating System Version

macOS Ventura 13.2.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

const robotjs = require("robotjs");

export const captureScreenshot = (
  x: number,
  y: number,
  width: number,
  height: number
) => {
  console.log({ x, y, width, height });
  const capture = robotjs.screen.capture(x, y, width, height); // HERE

  return capture.image;
};

It should return the correct image buffer.

Actual Behavior

Application closes with the following error:

[34686:0401/223944.621951:ERROR:CONSOLE(2)] "Electron sandboxed_renderer.bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (2)
[34686:0401/223944.622010:ERROR:CONSOLE(2)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (2)
{ x: 333, y: 215, width: 159, height: 46 }
[34686:0401/223944.989560:ERROR:node_bindings.cc(158)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox.

Testcase Gist URL

No response

Additional Information

No response

@Prinzhorn
Copy link
Contributor

https://www.electronjs.org/blog/v8-memory-cage
#35801

robotjs is not compatible with Electron 21+, this needs to be fixed in robotjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants