obs-websocket-community-projects / obs-websocket-js

Consumes https://github.com/obsproject/obs-websocket
MIT License
680 stars 96 forks source link

Password ignored, 'Not Authenticated' error #221

Closed christinna9031 closed 3 years ago

christinna9031 commented 3 years ago

Using dist/obs-websocket.js version in a browser. Can only connect without a password. If I test the connection with "1234" (or any other) password, it fails. I know 100% the websocket is installed correctly (newest version) and the password is right since I tested it by connecting to a stream deck just fine.

const obs = new OBSWebSocket();
obs.connect ({
    address: 'localhost:4444',
    password: '1234'
  });

Getting {error: 'Not Authenticated', message-id: '0', status: 'error', messageId: '0'}

Thanks for any help!

Edit: Found the issue. Need to wait for it to authenticate first before sending any commands.