-
Notifications
You must be signed in to change notification settings - Fork 2
Bad Request #1
Comments
Hi @dunnkers, can you set Besides it won't hurt if you install the Mac/DMG KeePassXC version from here https://github.com/keepassxreboot/keepassxc/releases and try to associate with it instead of MacPass. MacPass should be closed before running KeePassXC, as most likely both tools will try to listen on the same 19455 port (default keepasshttp listening port). You will need to explicitly enable the keepasshttp feature in the KeePassXC settings (Browser Integration settings tab). PS module has been tried and successfully worked with original KeePass on Windows and KeePassXC on Linux, I've not tried running it with MacPass / MacPassHTTP stuff. |
This is the shell output: $$ NODE_DEBUG=http node test-keepass.js
HTTP 1944: call onSocket 0 0
HTTP 1944: createConnection localhost:19455: { servername: 'localhost',
auth: null,
path: null,
port: '19455',
hostname: 'localhost',
protocol: 'http:',
_abort: false,
_raw: [],
timeout: 0,
size: 0,
bodyUsed: false,
body: '{"TriggerUnlock":false,"Nonce":"asdf33Ak3#JFIa==","Verifier":"HFo2fRrdfasP97Wddjb5yW+84asdfsNkYsRv3311d+I=","RequestType":"associate","Key":"FFeRaaaP6L4fsasdf382mrkdfasoNIC63aeQL+o+klVQA="}',
agent: undefined,
counter: 0,
compress: true,
follow: 20,
url: 'http://localhost:19455',
headers:
{ 'accept-encoding': [ 'gzip,deflate' ],
'user-agent': [ 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)' ],
connection: [ 'close' ],
accept: [ '*/*' ],
'content-length': [ 195 ] },
redirect: 'follow',
method: 'POST',
host: 'localhost',
_agentKey: 'localhost:19455:' }
HTTP 1944: sockets localhost:19455: 1
HTTP 1944: write ret = false
HTTP 1944: outgoing message end.
HTTP 1944: AGENT incoming response!
HTTP 1944: AGENT isHeadResponse false
{ Error: Bad Request
at new NetworkResponseStatusCodeError (/Users/dunnkers/Documents/git/ing-api/ing-api/node_modules/keepasshttp-client/model/common.js:36:28)
at KeePassHttpClient.<anonymous> (/Users/dunnkers/Documents/git/ing-api/ing-api/node_modules/keepasshttp-client/client.js:133:35)
at step (/Users/dunnkers/Documents/git/ing-api/ing-api/node_modules/tslib/tslib.js:131:27)
at Object.next (/Users/dunnkers/Documents/git/ing-api/ing-api/node_modules/tslib/tslib.js:112:57)
at fulfilled (/Users/dunnkers/Documents/git/ing-api/ing-api/node_modules/tslib/tslib.js:102:62)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7) statusCode: 400 }
HTTP 1944: CLIENT socket onClose
HTTP 1944: removeSocket localhost:19455: writable: false
HTTP 1944: HTTP socket close When running this code: const { KeePassHttpClient } = require("keepasshttp-client");
const client = new KeePassHttpClient();
client.associate()
.then(() => client.getLogins({ url: 'twitter.com' }))
.then((records) => console.log(JSON.stringify(records, null, 2)))
.catch((err) => console.error(err)); Thanks for diving into this. There has to be some small miscommunication between Regards. ✌🏻 |
BTW my KeePassHTTP Server was running in the execution of that code 👆🏻 |
@dunnkers Just tried to debug it running the same code. I get What happens if you run just const {KeePassHttpClient} = require("keepasshttp-client");
const client = new KeePassHttpClient(/*{url: "http://localhost:19455"}*/);
client.associate()
.then(console.log)
.catch(console.error); Also try to execute Btw try to use previous version of your plugin/tools MacPass/MacPassHTTP#48 |
Using your code to only just run |
The apparent difference is in http request libraries used, I prefer to use much more lightweight library than |
@dunnkers can you try just recently posted 2.2.5 version. |
Ok, closing then. |
I think we can consider this issue closed! |
Hello! Thanks for this seemingly handy module. I cannot get it to work, however. The error I get when I try to
client.associate()
is:I'm using MacPass along with the MacPassHTTP plugin.
Help is appreciated!
The text was updated successfully, but these errors were encountered: