You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Node 18 that doesn't contain the global crypto WebCrypto API, Framework 2.4.0 fails to be invoked with strictAuthentication: true during the HMAC validation.
[Error]: Unknown BridgeError: crypto is not defined
at bt.handleError (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:6281)
at bt.handleAction (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:4889)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:3618 {
data: {
stack: 'ReferenceError: crypto is not defined\n' +
' at Or (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:1:11777)\n' +
' at bt.validateHmac (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:6587)\n' +
' at bt.handleAction (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:4619)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async /app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:3618'
},
statusCode: 500,
code: 'BridgeError'
}
👟 Reproduction steps
Install @novu/framework@2.4.0, serve a workflow with a Node 18 or less runtime.
Attempt to sync the Workflow with strictAuthentication: true
👍 Expected behavior
Sync should be successfull
👎 Actual Behavior with Screenshots
Sync fails with error:
[Error]: Unknown BridgeError: crypto is not defined
at bt.handleError (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:6281)
at bt.handleAction (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:4889)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:3618 {
data: {
stack: 'ReferenceError: crypto is not defined\n' +
' at Or (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:1:11777)\n' +
' at bt.validateHmac (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:6587)\n' +
' at bt.handleAction (/app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:4619)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async /app/node_modules/@novu/framework/dist/cjs/servers/express.cjs:95:3618'
},
statusCode: 500,
code: 'BridgeError'
}
Novu version
Novu SaaS
npm version
No response
node version
18
📃 Provide any additional context for the Bug.
A polyfill for global crypto should be added in Node environments with version 18 or less.
👀 Have you spent some time to check if this bug has been raised before?
rifont
changed the title
🐛 Bug Report: Unknown BridgeError: crypto is not defined
🐛 Bug Report: Node <18 - Unknown BridgeError: crypto is not definedNov 13, 2024
rifont
changed the title
🐛 Bug Report: Node <18 - Unknown BridgeError: crypto is not defined
🐛 Bug Report: Node <=18 - Unknown BridgeError: crypto is not definedNov 13, 2024
📜 Description
When using Node 18 that doesn't contain the global
crypto
WebCrypto API, Framework 2.4.0 fails to be invoked withstrictAuthentication: true
during the HMAC validation.👟 Reproduction steps
@novu/framework
@2.4.0, serve a workflow with a Node 18 or less runtime.strictAuthentication: true
👍 Expected behavior
Sync should be successfull
👎 Actual Behavior with Screenshots
Sync fails with error:
Novu version
Novu SaaS
npm version
No response
node version
18
📃 Provide any additional context for the Bug.
A polyfill for global
crypto
should be added in Node environments with version 18 or less.👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: