Skip to content

Symbol not found in @node-rs/bcrypt when upgrade from 4.2.0 to 4.3.0 #6837

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

Closed
4 tasks done
davidyeiser opened this issue Jul 28, 2020 · 13 comments · Fixed by #6891
Closed
4 tasks done

Symbol not found in @node-rs/bcrypt when upgrade from 4.2.0 to 4.3.0 #6837

davidyeiser opened this issue Jul 28, 2020 · 13 comments · Fixed by #6891
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@davidyeiser
Copy link

We use GitHub Issues for reporting bugs with Parse Server.

Make sure these boxes are checked before submitting your issue - thanks for reporting issues back to Parse Server!

  • This isn't a vulnerability disclosure, if it is please follow our security policy.

  • You're running version >=2.3.2 of Parse Server, we can't accept issues for very outdated releases, please update to a newer version.

  • This isn't a question, if you need if you have questions about code please use Stack Overflow with the parse-platform tag & other questions can be posted on the community forum.

  • You've searched through existing issues, your issue may have been reported or resolved before.

Issue Description

Upgrading to 4.3.0 from 4.2.0 causes an error when I run parse server. I get this message:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/davidyeiser/dev/oombla-app/node_modules/@node-rs/bcrypt/bcrypt.darwin.node
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/davidyeiser/dev/oombla-app/node_modules/@node-rs/bcrypt/bcrypt.darwin.node
  Expected in: /usr/lib/libSystem.B.dylib

Perhaps related to #6794

I can't connect to the server at all. When I downgrade to 4.2.0 the error goes away and I can connect like normal. Nothing changes in my codebase, just the version of parse-server installed.

Steps to reproduce

I have a lot of things in my set up, it's mixed with Create React App, etc. I'm not sure how you would reproduce it, I just know that trying to use 4.3.0 causes the error. Some dead-end Google searches mentioned perhaps a binary that was built on a newer version of Mac OS? But I'm really not sure.

Using these packages:

"parse": "2.12.0",
"parse-dashboard": "2.0.5",
"parse-server": "4.2.0",

My computer is nearly six years old, so that could be the problem :) I'm fine to just use 4.2.0. Feel free to close this if it doesn't seem relevant, wanted to report it just in case.

Environment Setup

  • Server

    • parse-server version: 4.3.0
    • Operating System: macOS Sierra 10.12.6
    • Hardware: iMac 27" Retina 5k Late 2014
    • Localhost or remote server? localhost
  • Database

    • MongoDB version: 3.6.3
    • Storage engine: WiredTiger (I think?)
    • Hardware: It's running on my computer, same as above, but not sure if that's what this is asking.
    • Localhost or remote server? localhost
@mtrezza
Copy link
Member

mtrezza commented Jul 29, 2020

Thanks for opening this issue. From your description it seems you are running Parse Server locally.

Can you please try the following when upgrading Parse Server:

  1. change Parse Server dependency to 4.3.0
  2. delete file package-lock.json
  3. delete folder node_modules
  4. run npm install in the local Parse Server directory
  5. run npm build in the local Parse Server directory
  6. try to run Parse Server

@davidyeiser
Copy link
Author

davidyeiser commented Jul 31, 2020

I'll put together a sample repository next week to try to recreate it if I can.

(I tried doing 1-6 prior to posting the issue, but I was using yarn not npm)

@davidyeiser
Copy link
Author

I created a test case here: https://github.com/davidyeiser/test-parse-server-express

With Parse Server 4.3.0 I get the following message when I run npm run dev:

$ npm run dev

> [email protected] dev <~LOCAL_PATH>/test-parse-server-express
> node api/index.js

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: <~LOCAL_PATH>/test-parse-server-express/node_modules/@node-rs/bcrypt/bcrypt.darwin.node
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: <~LOCAL_PATH>/test-parse-server-express/node_modules/@node-rs/bcrypt/bcrypt.darwin.node
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6
$ 

If I change parse-server to 4.2.0 it works fine: Parse Server loads and I can access Parse Dashboard.

@mtrezza
Copy link
Member

mtrezza commented Aug 25, 2020

The error message looks to me as if the prebuilt bcrypt binary was not compatible with your version of macOS.

Can you try to:

  1. remove from package.json:
"optionalDependencies": {
    "@node-rs/bcrypt": "0.3.0"
  }
  1. delete file package-lock.json
  2. delete folder node_modules
  3. run npm install
  4. Optionally also run npm i bcrypt

@mtrezza
Copy link
Member

mtrezza commented Aug 28, 2020

Maybe related to #6794

@Brooooooklyn Could it be that @node-rs/bcrypt is using prebuilt binaries which causes the issue here?

@Brooooooklyn
Copy link
Contributor

oh yes,but it supposed to be fixed in 0.4.1. So let's upgrade it?

@mtrezza
Copy link
Member

mtrezza commented Aug 28, 2020

@davidyeiser Can you try upgrading to 0.4.1 and see whether it works for you?

@davidyeiser
Copy link
Author

What would be the best way to do that? In the test repository, you're talking about upgrading the @node-rs/bcrypt package in dependencies and optionalDependencies to 0.4.1 within the node_modues/parse-server package, correct?

@mtrezza
Copy link
Member

mtrezza commented Aug 31, 2020

Yes, that should work. You would set the version of @node-rs/bcrypt to 0.4.1 in package.json and package-lock.json for the node_modues/parse-server package, then run install to install that version.

@davidyeiser
Copy link
Author

I updated the node_modules/parse-server/package.json to point to 0.4.1 for @node-rs/bcrypt and ran npm install from the project root directory, but that didn't seem to upgrade it.

Then, from the root directory, I just ran npm uninstall @node-rs/bcrypt and then ran npm install @node-rs/bcrypt (which installed v. 0.4.1) and then the project worked as expected.

So that seems to fix the problem — thank you!

@davidyeiser
Copy link
Author

(Ah, I missed the package-lock.json) Let me know if the comment I just posted is sufficient for a test case.

@mtrezza
Copy link
Member

mtrezza commented Aug 31, 2020

Yes, I seems we need to upgrade the bcrypt version.

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed and removed troubleshooting labels Aug 31, 2020
@mtrezza mtrezza mentioned this issue Nov 2, 2020
4 tasks
@mtrezza
Copy link
Member

mtrezza commented Nov 2, 2020

The issue has been fixed in the newest version of Parse Server 4.4.0, which is about to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants