bcrypt is crashing the app while generating salt or hashed password
up vote
-1
down vote
favorite
As per the bcrypt npm documentation I tried to incorporate the package but unable to use bcrypt package in my app, so to test the bcrypt separately I created sample js file which is also crashing on execution without giving any error. Below is the js file which I tried to test. I tried to pass the constant value to hash function, which is also not working.
const bcrypt = require('bcrypt');
async function run(){
const saltValue =await bcrypt.genSalt(10);
bcrypt.hash('12345',saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
Version:
node : 9.0.0
npm: '5.5.1'
"bcrypt": "^3.0.2",
With nodemon, I am getting message: app crashed - waiting for file changes before starting...
in normal execution it is not showing any error.
Update:
If change the bcrypt's async methods with synchronous then it is working fine,
const saltValue = bcrypt.genSaltSync(10);
const hashed = bcrypt.hashSync('12345',saltValue);
I think someone from bcrypt team can answer.
Update: This issue raised on the community and few other developers are facing the same issue, for more information you can refer the link.
https://github.com/kelektiv/node.bcrypt.js/issues/674
node.js npm bcrypt
|
show 12 more comments
up vote
-1
down vote
favorite
As per the bcrypt npm documentation I tried to incorporate the package but unable to use bcrypt package in my app, so to test the bcrypt separately I created sample js file which is also crashing on execution without giving any error. Below is the js file which I tried to test. I tried to pass the constant value to hash function, which is also not working.
const bcrypt = require('bcrypt');
async function run(){
const saltValue =await bcrypt.genSalt(10);
bcrypt.hash('12345',saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
Version:
node : 9.0.0
npm: '5.5.1'
"bcrypt": "^3.0.2",
With nodemon, I am getting message: app crashed - waiting for file changes before starting...
in normal execution it is not showing any error.
Update:
If change the bcrypt's async methods with synchronous then it is working fine,
const saltValue = bcrypt.genSaltSync(10);
const hashed = bcrypt.hashSync('12345',saltValue);
I think someone from bcrypt team can answer.
Update: This issue raised on the community and few other developers are facing the same issue, for more information you can refer the link.
https://github.com/kelektiv/node.bcrypt.js/issues/674
node.js npm bcrypt
What's the error message?
– Darkrum
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
1
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13
|
show 12 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
As per the bcrypt npm documentation I tried to incorporate the package but unable to use bcrypt package in my app, so to test the bcrypt separately I created sample js file which is also crashing on execution without giving any error. Below is the js file which I tried to test. I tried to pass the constant value to hash function, which is also not working.
const bcrypt = require('bcrypt');
async function run(){
const saltValue =await bcrypt.genSalt(10);
bcrypt.hash('12345',saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
Version:
node : 9.0.0
npm: '5.5.1'
"bcrypt": "^3.0.2",
With nodemon, I am getting message: app crashed - waiting for file changes before starting...
in normal execution it is not showing any error.
Update:
If change the bcrypt's async methods with synchronous then it is working fine,
const saltValue = bcrypt.genSaltSync(10);
const hashed = bcrypt.hashSync('12345',saltValue);
I think someone from bcrypt team can answer.
Update: This issue raised on the community and few other developers are facing the same issue, for more information you can refer the link.
https://github.com/kelektiv/node.bcrypt.js/issues/674
node.js npm bcrypt
As per the bcrypt npm documentation I tried to incorporate the package but unable to use bcrypt package in my app, so to test the bcrypt separately I created sample js file which is also crashing on execution without giving any error. Below is the js file which I tried to test. I tried to pass the constant value to hash function, which is also not working.
const bcrypt = require('bcrypt');
async function run(){
const saltValue =await bcrypt.genSalt(10);
bcrypt.hash('12345',saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
Version:
node : 9.0.0
npm: '5.5.1'
"bcrypt": "^3.0.2",
With nodemon, I am getting message: app crashed - waiting for file changes before starting...
in normal execution it is not showing any error.
Update:
If change the bcrypt's async methods with synchronous then it is working fine,
const saltValue = bcrypt.genSaltSync(10);
const hashed = bcrypt.hashSync('12345',saltValue);
I think someone from bcrypt team can answer.
Update: This issue raised on the community and few other developers are facing the same issue, for more information you can refer the link.
https://github.com/kelektiv/node.bcrypt.js/issues/674
node.js npm bcrypt
node.js npm bcrypt
edited Dec 6 at 1:59
asked Nov 12 at 1:04
ironman
9439
9439
What's the error message?
– Darkrum
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
1
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13
|
show 12 more comments
What's the error message?
– Darkrum
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
1
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13
What's the error message?
– Darkrum
Nov 12 at 1:08
What's the error message?
– Darkrum
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
1
1
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13
|
show 12 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
bcrypt can be funky sometimes... replace with bcryptjs (far more popular anyway...)
This works just fine:
const bcrypt = require('bcryptjs');
async function run() {
const saltValue = await bcrypt.genSalt(10);
bcrypt
.hash('12345', saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
bcrypt can be funky sometimes... replace with bcryptjs (far more popular anyway...)
This works just fine:
const bcrypt = require('bcryptjs');
async function run() {
const saltValue = await bcrypt.genSalt(10);
bcrypt
.hash('12345', saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
|
show 2 more comments
up vote
0
down vote
bcrypt can be funky sometimes... replace with bcryptjs (far more popular anyway...)
This works just fine:
const bcrypt = require('bcryptjs');
async function run() {
const saltValue = await bcrypt.genSalt(10);
bcrypt
.hash('12345', saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
|
show 2 more comments
up vote
0
down vote
up vote
0
down vote
bcrypt can be funky sometimes... replace with bcryptjs (far more popular anyway...)
This works just fine:
const bcrypt = require('bcryptjs');
async function run() {
const saltValue = await bcrypt.genSalt(10);
bcrypt
.hash('12345', saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
bcrypt can be funky sometimes... replace with bcryptjs (far more popular anyway...)
This works just fine:
const bcrypt = require('bcryptjs');
async function run() {
const saltValue = await bcrypt.genSalt(10);
bcrypt
.hash('12345', saltValue)
.then(result => console.log(result))
.catch(error => console.log(error));
}
run();
answered Nov 12 at 1:36
SakoBu
788317
788317
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
|
show 2 more comments
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
I think node.bcrypt.js and bcryptjs are two different packages.
– ironman
Nov 12 at 1:41
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
There are a bunch... Which one are you using specifically? Can you link to the npm package here?
– SakoBu
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
@ironman they are but they accomplish the same thing. bcryptjs is just pure JavaScript implementation. No dependencies like the one your using.
– Darkrum
Nov 12 at 1:42
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
I am using npmjs.com/package/bcrypt.
– ironman
Nov 12 at 1:43
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
@ironman yes we know but Sakobu is right bcrypt does have issues across different platforms because it is complied. Memory serves me I was having issues with it when working on a raspberry pi so I used the pure JavaScript library instead.
– Darkrum
Nov 12 at 1:46
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254805%2fbcrypt-is-crashing-the-app-while-generating-salt-or-hashed-password%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What's the error message?
– Darkrum
Nov 12 at 1:08
app crashed - waiting for file changes before starting... As i have mentioned in the question it is crashing without giving any error:
– ironman
Nov 12 at 1:08
If I execute it with node then it crashed without showing any error or any message like app crashed.
– ironman
Nov 12 at 1:10
1
If there's no error then it completed it's execution. Node will exit after running a file.
– Darkrum
Nov 12 at 1:11
I know, but I am not getting any output and the message is also showing app crashed. If I comment the two lines which are using bcrypt then the function is executing without crashing application.
– ironman
Nov 12 at 1:13