Hanging after hash or hashSync on one PC but not another #1046
Replies: 1 comment
-
Ok I got this fixed. I had in my dockerfile the lines I still don't understand why this caused an issue with bcrypt, as the library worked just fine if I installed it outside of docker in a clean project and ran it outside docker too. It also didn't cause an issue on another PC. Anyway, leaving this here in case someone else has this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm doing this
const passwordHash = await bcrypt.hash('test', 10)
and also tried this
const passwordHash = bcrypt.hashSync('test', 10)
and I tried with 5 or just 1 salt rounds argument. But what happens is that the process hangs on this and has to be forcefully shut down. I tried with console.logs immediately before and after to see it is indeed this line where it hangs.
The strange thing is, that it works just fine on my other PC. It worked on this PC too, until I had a pause from development for 2 weeks, and when I came back it did not work anymore.
The node-program is run inside a docker container.
My problematic PC has Ubuntu 22.04.
I install the node_modules with Node 20.8.0, but the docker which runs it has node:20-alpine3.16 docker image.
Bcrypt version is 5.1.1.
I didn't make an issue because this seems to be about my PC. Can anyone guide me with how to proceed with debugging this? I have tried to remove and reinstall node_modules, the whole folder, also doing npm remove and install bcrypt, npm audit fix, deleted the docker container + image and rebuilt it each time.... nothing seems to work.
Beta Was this translation helpful? Give feedback.
All reactions