[MONGOCRYPT-565] symbol lookup error : undefined symbol: napi_set_instance_data Created: 28/Mar/23  Updated: 27/Oct/23  Resolved: 31/Mar/23

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Josman Perez Exposito Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File app.js     File bootstrap.js     File db_encryption.js    
Case:

 Description   

Hello team,

I have a customer that is having the following error when using the mongodb-client-encryption version 2.7.1

The error message is the following:

node /var/www/html/backend/users-service/dist/app.js: symbol lookup error: /var/www/html/backend/users-service/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node: undefined symbol: napi_set_instance_data

This is happening with the:

  • mongodb-client-encryption: 2.7.1
  • moongose: 5.13.15
  • node: 10.17
  • mongo 4.4

The environment is a Docker container.

The package.json file content is:

{
  "name": "csfle",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "body-parser": "^1.20.2",
    "cookie-parser": "~1.4.4",
    "cors": "^2.8.5",
    "debug": "~2.6.9",
    "ejs": "~2.6.1",
    "express": "~4.16.1",
    "helmet": "^6.0.1",
    "http-errors": "~1.6.3",
    "mongodb-client-encryption": "^2.6.0",
    "mongoose": "5.13.15",
    "morgan": "~1.9.1"
  }
}

There are a couple of other files requested from the customer:

I tried to reproduce this using a Docker container but no luck so far. There is no readme on the https://www.npmjs.com/package/mongodb-client-encryption so I couldn't create a sample project to try to reproduce this.

Please let me know if you need the Dockerfile and docker-compose to replicate the infrastructure.



 Comments   
Comment by Josman Perez Exposito [ 31/Mar/23 ]

Totally! Will close it now. Thanks

Comment by Rishabh Bisht [ 31/Mar/23 ]

josman.perez@mongodb.com Since the cause has been diagnosed (a compatibility issue), are we good to close this ticket?

Comment by Josman Perez Exposito [ 28/Mar/23 ]

Hello team, I think we've found the issue thanks to daria.pardue@mongodb.com

the version they are using 2.7.1 is not compatible with Node 10. In fact, versions greater than 2.0.0 requires Node 12 or higher

Generated at Thu Feb 08 09:08:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.