using nodeJs errorCode: 125


I am trying to connect to cloud instance via nodeJs. On windows I get a ‘make dir() failed: no such file or directory’ (same as realm-js, issue 2097)

if I try it from a debian linux host (on top of windows linux service) I get
{ message: ‘Operation canceled’, errorCode: 125 }

I tried serveral configuration for sync but I keep getting the same error. The user I use to login is administrator en I am able to login with that user via realm studio.

The error occurs in Authentication of the user is succesfull.

The serverlog (via realm studio) shows a message with:
{“type”:“",“title”:"Your request did not validate because of missing parameters.”,“status”:400,“code”:602,“invalid_params”:[{“name”:“token”,“reason”:“Missing parameter ‘token’!”}]}

I use node v10.15 and realm 2.21.1 via npm .

Does anybody know what I am doing wrong?

here is the code I use :

const Realm = require('realm');
const constants = require('./constants.js');

function main () {

 const Client = {
    name: "Client",
    primaryKey: "clientId",
    properties: {
      clientId: "string",
      firstname: "string",
      lastname: "string",


 const creds = Realm.Sync.Credentials.usernamePassword(constants.username, constants.password, false);


 Realm.Sync.User.login(`https://${constants.serverUrl}`, creds)
    .then((user) => {
        let configuration = {
                sync: { user: user,
                        error: (err) => {console.log('err opening sync: ' + err);},
                        //url: `realms://${constants.serverUrl}`,
                        fullSynchronization: false,
                        ssl: {validate: true},
        schema: [Client],

        let config = user.createConfiguration(configuration);
            .then(realm => {
                console.log('we have a realm!!');
                // Query Realm for all client
                const clients = realm.objects('Client');

                // Will return a Results object with our 1 car
                console.error(clients.length); // => 1

            .catch((error) => {
                console.error('shit, we have an error:', error);
    .catch((error) => {
        console.error('Login error:', error);
//end of main



@avanschijndel You need a sync.url parameter in your syncConfig that has a valid Realm path, for example:


As documented here -


@ianward thanks for your response. I did add the realm to sync (default) to the sync props (again), but still get the same error: ‘operation cancelled’, errorcode: 125.

When I try to run de nodeJs script, I stil get the following error:

  • Your request did not validate because of missing parameters: Missing parameter ‘token’!

Do you know which token this log is referring to?


@avanschijndel Can you wipe the local state and retry please?

rm -rf realm-object-server

If that doesn’t work please open a ticket at with a repro and we will get you sorted


thanks for your answer. removing the realm-object-server directory and subdirs gives the same errorcode. I did open a ticket at


I am having the same issue with the same errors. I am also on windows and using cloud. Is there a solution for this?