Skip to content

Convex runtime: crypto.subtle.deriveBits for ECDH not supported #62

@aboire

Description

@aboire

Problem

PushForge lists Convex as "Fully supported" in the README, but buildPushHTTPRequest fails in the Convex default runtime because crypto.subtle.deriveBits for ECDH is not implemented.

Error

Not implemented: crypto.subtle.deriveBits for ECDH.
Consider calling an action defined in Node.js instead.
    at deriveSharedSecret (node_modules/@pushforge/builder/dist/lib/shared-secret.js:15:25)
    at encryptPayload (node_modules/@pushforge/builder/dist/lib/payload.js:173:41)
    at async buildPushHTTPRequest (node_modules/@pushforge/builder/dist/lib/request.js:147:60)

Details

  • @pushforge/builder v2.0.1
  • Convex exposes crypto.subtle but doesn't implement deriveBits for ECDH (P-256)
  • The Convex example in the README uses a regular action (no "use node" directive)
  • The only workaround is adding "use node" to the file, which forces the Node.js runtime

Suggestion

Either:

  1. Update the README/docs to note that Convex requires "use node" for the action file
  2. Or provide a fallback implementation that doesn't rely on deriveBits (if possible)

Thanks for the great library!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions