Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

RosException CANTLOGIN Username or password is invalid #33

Open
khertg opened this issue Jun 1, 2021 · 1 comment
Open

RosException CANTLOGIN Username or password is invalid #33

khertg opened this issue Jun 1, 2021 · 1 comment

Comments

@khertg
Copy link

khertg commented Jun 1, 2021

RouterOS v6.45.9

Tried this code and says cannot login.

const RosApi = require('node-routeros').RouterOSAPI;

const conn = new RosApi({
  host: '*******',
  user: '******',
  password: '******',
});

conn
  .connect()
  .then(() => {
    // Connection successful
    console.log('Connection Successful')
  })
  .catch((err) => {
    // Got an error while trying to connect
    console.log(err);
  });

Error

RosException: Username or password is invalid
    at E:\Projects\mikrotek-test\node_modules\node-routeros\dist\RouterOSAPI.js:397:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  name: 'RosException',
  errno: 'CANTLOGIN',
  message: 'Username or password is invalid'
}
@ve3
Copy link

ve3 commented Jun 8, 2023

For anyone who have the same problem, don't download from release page but download from fresh code.
https://github.com/aluisiora/node-routeros/archive/refs/heads/development.zip

Or you can still install from npm package.
npm i node-routeros.
https://www.npmjs.com/package/node-routeros

It is showing deprecated, yes. but tested from few months ago I still don't see any package that work with Mikrotik 6.x latest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants