Code Monkey home page Code Monkey logo

Comments (12)

jangxx avatar jangxx commented on July 2, 2024

Have you checked the return value of the connect() call? It will be null on success and an Error object if there was a problem. The error will hopefully contain some useful information.

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

@jangxx Thanks for the fast reply! It throws an error, but the error doesn't lead me anywhere - maybe it will make more sense to you?

Here:

  const ViGEmClient = require('vigemclient')
  client = new ViGEmClient()
  const connection = client.connect()
  console.log({connection})

output of console.log:
image

ViGEmClient.js:34:31:
image

slight note: I added a console log in the ViGEmClient.js:34:31 to confirm the clientHandle was not the problem

from node-vigemclient.

jangxx avatar jangxx commented on July 2, 2024

That's a bit weird, usually the error should contain an error message. Can you try to console.log the errCode from the connect method? Maybe it returns an error that is not contained in the VIGEM_ERRORS object.

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

Certainly @jangxx!

Test:

image
image

Error codes:

image

Result:

Somehow the errorcode is a negative value and is -536870911 instead of '536870912': 'VIGEM_ERROR_NONE' (1 instead of 2)

from node-vigemclient.

jangxx avatar jangxx commented on July 2, 2024

Apparently there is a bug in the native code for the connect() function that incorrectly casts the returned error code to a negative number. A fix is already on the way for that bug, maybe that will fix your problem as well. Apparently the error code is correct (i.e. it is VIGEM_ERROR_NONE), just the conversion to a javascript Number seems wrong somehow.

from node-vigemclient.

jangxx avatar jangxx commented on July 2, 2024

I have just pushed version 1.2.1 to git. Can you please clone the repo and see if that changes anything about your problem? If it does I would publish it to npm.

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

I have just pushed version 1.2.1 to git. Can you please clone the repo and see if that changes anything about your problem? If it does I would publish it to npm.

Will do @jangxx, I'll let you know soon, thanks a ton!

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

@jangxx just a heads up - I realized that I wasn't using the latest driver - oops! I'm stilling getting errors though - it's unclear why. I will hopefully have some more answers by the end of day or tomorrow. Will keep you updated. Thanks!

from node-vigemclient.

jangxx avatar jangxx commented on July 2, 2024

I looked at your error code again (-536870911) and if you convert that to an unsigned integer, you get 3758096385, i.e. VIGEM_ERROR_BUT_NOT_FOUND. Maybe you could try to just restart your PC and then retry the installation of the bus driver.

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

@jangxx after updating to the latest git commit I was able to indentify that error (so the most recent commit you pushed up is working great), but a new error came up which I wanted to investigate - I don't have time to explain/document at the moment. My computer actually blue screened a few times. I'll hopefully work on figuring it out tonight/tomorrow. Thanks!

from node-vigemclient.

ekrenzin avatar ekrenzin commented on July 2, 2024

@jangxx here is what I have surmised:

The old driver (see below) is no longer supported by this package - at least it seems that way. I was using the old driver and updated to the new driver and restarted my computer. For whatever reason that was not effective. When I tested after restarting I got a spam of pings - the one you hear when a device connects to a usb port. After a bit my computer froze up and blue screened. This same thing happened on my coworkers device. It was actually the original bug I was hunting. After deleteing the old driver by running the executable and choosing the option "remove" then installing the latest driver and finally restarting, the problem seems to have resolved.

It seems I need to do a little bit of refactoring to finish making sure everything works again - but I think the onous is on me now. Thanks a ton for the support - it was really great working with you!

old driver:
image

from node-vigemclient.

jangxx avatar jangxx commented on July 2, 2024

Okay sounds good. I actually still used an old driver from 2019 up until yesterday, and to reproduce your bug I am in the process of upgrading now (haven't restarted my PC yet). As soon as that is done and I have verified that the library still works I will upload a new version to npm.

Edit: Version 1.2.1 is published to npm now.

from node-vigemclient.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.