CorsairOfficial / cue-sdk-node

A Node.js native wrapper around iCUE SDK
MIT License
33 stars 3 forks source link

dyld: Symbol not found: _CorsairPerformProtocolHandshake #16

Closed ahadcove closed 2 years ago

ahadcove commented 3 years ago

Running into weird issue on mac. This is on an M1 Mac mini, but works on my intel macbook pro.

I haven't had a chance to test this out yet on windows, but many of our users are using this and experiencing random crashes if they run into this bug. If we can, can we make this error gracefully.

Willing to do any tests you may need

dyld: Symbol not found: _CorsairPerformProtocolHandshake
  Referenced from: /Users/ahad/app/node_modules/cue-sdk/build/Release/cuesdk.node
  Expected in: flat namespace
intrueder commented 3 years ago

Hey @ahadcove It will take some time to get it working on the M1. Could you please replace the index.js of this package on your machine with the below content and check if that helps?

const enums = require('./src/enums')
const converters = require('./src/converters')
let binding

try {
  binding = require('node-gyp-build')(__dirname)
  binding.CorsairGetLastError()
} catch {
  binding = {
    CorsairPerformProtocolHandshake: function () {
      return null
    },
    CorsairGetLastError: function () {
      return enums.CorsairError.CE_ProtocolHandshakeMissing
    },
    CorsairGetDeviceCount: function () {
      return 0
    }
  }
}

const sdk = {
  ...enums,
  ...converters,
  ...binding
}

module.exports = sdk
ahadcove commented 3 years ago

This is definitely getting past the error that was being thrown @intrueder. And it'll do for now, until we can get a proper integration

intrueder commented 2 years ago

Fixed in v2.2.0 (CUESDK v3.0.447)