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

Exception thrown when registering before save hook on MacOS #494

Open
2 tasks
limouren opened this issue Mar 18, 2019 · 0 comments
Open
2 tasks

Exception thrown when registering before save hook on MacOS #494

limouren opened this issue Mar 18, 2019 · 0 comments
Labels

Comments

@limouren
Copy link
Contributor

Consider this hook registration:

skygearCloud.beforeSave('record', () => {
  console.log('beforeSave')
})

skygear-node would fail to start on MacOS. Related portion of stack trace:

(node:27631) UnhandledPromiseRejectionWarning: Error: Digest method not supported
    at new Hash (internal/crypto/hash.js:35:19)
    at Object.createHash (crypto.js:100:10)
    at funcName (/Users/limouren/myproject/node_modules/skygear-core/dist/cloud/index.js:187:33)
    at Object.beforeSave (/Users/limouren/myproject/node_modules/skygear-core/dist/cloud/index.js:563:14)

Line in concern

const hash = crypto.createHash('sha');

Possible related issue: nodejs/node#17590

  • Skygear SDK Date/Version:
  • JS runtime:
  • Skygear Server Date/Version:
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

beforeSave registered successfully.

Actual Results

Stated in description.

Steps to reproduce

Stated in description.

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

2 participants