delian / node-unifiapi

UniFi API ported to Node.JS

Repository from Github https://github.comdelian/node-unifiapiRepository from Github https://github.comdelian/node-unifiapi

Segmentation fault (core dumped)

TylerLafayette opened this issue · comments

When I run the example for the Cloud Access with my credentials I get this error:
Segmentation fault (core dumped)
When I change the credentials to be incorrect I just get a long JSON error.
My code is exactly the same as the code in the example but here it is just in case:

let r = cloud({
    deviceId: '892se6-734c-461c-9ca8-e80bgdf5c226', // The cloud id of the device
    username: 'TylerLafayette',
    password: '<passwordHere>',
    // debug: true, // More debug of the API (uses the debug module)
    // debugNet: true // Debug of the network requests
});
r.api.stat_sessions()
    .then((data) => {
        console.log('Stat sessions', data);
        return r.api.stat_allusers();
    })
    .then((data) => {
        console.log('AP data', data);
    })
    .catch((err) => {
        console.log('matError', err);
    })```