We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Today I used patch-package to patch @miniflare/durable-objects@2.3.0 for the project I'm working on.
@miniflare/durable-objects@2.3.0
Invoking newUniqueId throws a TypeMismatchError. Replacing the DataView with Uint8Array fixes the issue.
newUniqueId
TypeMismatchError
DataView
Uint8Array
Here is the diff that solved my problem:
diff --git a/node_modules/@miniflare/durable-objects/dist/src/index.js b/node_modules/@miniflare/durable-objects/dist/src/index.js index 692dd6d..9d3c92a 100644 --- a/node_modules/@miniflare/durable-objects/dist/src/index.js +++ b/node_modules/@miniflare/durable-objects/dist/src/index.js @@ -159,7 +159,7 @@ var DurableObjectNamespace = class { const id = new Uint8Array(32); const view = new DataView(id.buffer); view.setBigUint64(1, BigInt(Date.now())); - import_crypto.webcrypto.getRandomValues(new DataView(id.buffer, 9, 15)); + import_crypto.webcrypto.getRandomValues(new Uint8Array(id.buffer, 9, 15)); id.set(this.#objectNameHash, 24); return new DurableObjectId(this.#objectName, hexEncode(id)); }
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
Fixed in b887877
Sorry, something went wrong.
Hey! 👋 I've just released version 2.4.0 including the fix for this. You can find the full changelog here.
2.4.0
fix: upgrade miniflare to ^2.4.0
256b122
This gets us the fix to this: cloudflare/miniflare#188 which is current breaking all tests on the CI.
fix: upgrade miniflare to ^2.4.0 (#1312)
69b2004
No branches or pull requests
Today I used patch-package to patch
@miniflare/durable-objects@2.3.0
for the project I'm working on.Invoking
newUniqueId
throws aTypeMismatchError
. Replacing theDataView
withUint8Array
fixes the issue.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: