Comments (12)
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.
@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})
slight note: I added a console log in the ViGEmClient.js:34:31 to confirm the clientHandle was not the problem
from node-vigemclient.
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.
Certainly @jangxx!
Test:
Error codes:
Result:
Somehow the errorcode is a negative value and is -536870911
instead of '536870912': 'VIGEM_ERROR_NONE'
(1 instead of 2)
from node-vigemclient.
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.
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.
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.
@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.
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.
@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.
@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!
from node-vigemclient.
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)
- Something is wrong with the feeder HOT 11
- Installed and Built but having issues resolving build files HOT 1
- USB Vendor and Product ID setting doesn't take effect HOT 5
- Disconnecting a Controller causes segmentation fault HOT 7
- Left trigger and right trigger for xBox controller? HOT 2
- Can't Install ViGEmClient HOT 14
- The button didn't detected even though i already set the value to true HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-vigemclient.