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

this.memory.buffer.subarray is not a function Error #7

Open
mjackson opened this issue Sep 9, 2024 · 1 comment · May be fixed by #8
Open

this.memory.buffer.subarray is not a function Error #7

mjackson opened this issue Sep 9, 2024 · 1 comment · May be fixed by #8

Comments

@mjackson
Copy link

mjackson commented Sep 9, 2024

When there is an error in one of my callbacks, I get the following error from milo's fail handler:

TypeError: this.memory.buffer.subarray is not a function
    at Object.fail (/Users/michael/Projects/remix-the-web/node_modules/.pnpm/@[email protected]/node_modules/@perseveranza-pets/milo/index.js:40:37)
    at runCallback (/Users/michael/Projects/remix-the-web/node_modules/.pnpm/@[email protected]/node_modules/@perseveranza-pets/milo/index.js:18:13)
    at wasm://wasm/00036016:wasm-function[25]:0x57e2
    at wasm://wasm/00036016:wasm-function[6]:0x68f
    at wasm://wasm/00036016:wasm-function[47]:0x74a3
    at Object.parse (/Users/michael/Projects/remix-the-web/node_modules/.pnpm/@[email protected]/node_modules/@perseveranza-pets/milo/index.js:35:15)
    at file:///Users/michael/Projects/remix-the-web/packages/node-fetch-server/src/lib/serve.ts:172:33
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Node.js v22.8.0

It looks like memory.buffer is an ArrayBuffer, but you're expecting it to be a TypedArray.

@mjackson
Copy link
Author

mjackson commented Sep 9, 2024

Looking into this a bit further, it looks like this behavior was introduced in 04f3673#diff-a439b77f7755dc3c938b4e914e26d1bbabc3e72060ad35824cbcbf26b90ad9a8R50

mjackson added a commit to mjackson/milo that referenced this issue Sep 9, 2024
@mjackson mjackson linked a pull request Sep 9, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant