[GH-ISSUE #55] Could not get server info, update your acebase server version #23

Closed
opened 2026-05-23 08:34:41 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @srebling on GitHub (Jan 20, 2023).
Original GitHub issue: https://github.com/appy-one/acebase-client/issues/55

Getting this message when trying a simple client connection. 'Could not get server info, update your acebase server version'
I am using the latest version. Also receive a 'not found' error when issuing a db.ref().get() on a paths that I know exist. No authentication or signin needed for this use case. This is all on the same localhost (OSX 10.15.7, node v16.14.2). The database was generated with a node.js app using just the acebase engine, which works very well and as expected for reading and writing to the database. The code below is running in two separate terminal instances. What am I missing? Thanks.

Server code:

const { AceBaseServer } = require('acebase-server');
const dbname = '../../PG-Messages';

const settings = {
    host: 'localhost',
    port: 5757,
    authentication: {
        enabled: false,
        allowUserSignup: false,
        defaultAccessRule: 'allow',
        defaultAdminPassword: '75sdDSFg37w5'
    }
}

const server = new AceBaseServer(dbname, settings);
server.on('ready', () => {
    console.log("SERVER ready");
});

Client code:

const { AceBaseClient } = require('acebase-client');
const db = new AceBaseClient({ host: "localhost", port: 5757, dbname: '../../PG-Messages', https: false });
db.ready(() => {
    console.log('Connected successfully');
    getMsg('/');
});

async function getMsg(path){
    let msg = {};
    const snapshot = await db.ref(`messages${path}`).get();
    if (snapshot.exists()) {
        msg = snapshot.val();
    }
    else {
        msg = 'No messages'; // use defaults
    }
    console.log('get result:', msg);
}

package.json:

{
  "name": "acebase-test",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "acebase": "^1.26.2",
    "acebase-client": "^1.20.0",
    "acebase-server": "^1.16.2"
  }
}
Originally created by @srebling on GitHub (Jan 20, 2023). Original GitHub issue: https://github.com/appy-one/acebase-client/issues/55 Getting this message when trying a simple client connection. 'Could not get server info, update your acebase server version' I am using the latest version. Also receive a 'not found' error when issuing a db.ref().get() on a paths that I know exist. No authentication or signin needed for this use case. This is all on the same localhost (OSX 10.15.7, node v16.14.2). The database was generated with a node.js app using just the acebase engine, which works very well and as expected for reading and writing to the database. The code below is running in two separate terminal instances. What am I missing? Thanks. Server code: ``` const { AceBaseServer } = require('acebase-server'); const dbname = '../../PG-Messages'; const settings = { host: 'localhost', port: 5757, authentication: { enabled: false, allowUserSignup: false, defaultAccessRule: 'allow', defaultAdminPassword: '75sdDSFg37w5' } } const server = new AceBaseServer(dbname, settings); server.on('ready', () => { console.log("SERVER ready"); }); ``` Client code: ``` const { AceBaseClient } = require('acebase-client'); const db = new AceBaseClient({ host: "localhost", port: 5757, dbname: '../../PG-Messages', https: false }); db.ready(() => { console.log('Connected successfully'); getMsg('/'); }); async function getMsg(path){ let msg = {}; const snapshot = await db.ref(`messages${path}`).get(); if (snapshot.exists()) { msg = snapshot.val(); } else { msg = 'No messages'; // use defaults } console.log('get result:', msg); } ``` package.json: ``` { "name": "acebase-test", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "acebase": "^1.26.2", "acebase-client": "^1.20.0", "acebase-server": "^1.16.2" } } ```
Author
Owner

@donl commented on GitHub (Jan 22, 2023):

I doubt AceBase supports having / in the database name when using the server or client.

If you are trying to have the server store the database in a specific path, there is a configuration option path for that (might be missing from the documentation).

<!-- gh-comment-id:1399367426 --> @donl commented on GitHub (Jan 22, 2023): I doubt AceBase supports having ```/``` in the database name when using the server or client. If you are trying to have the server store the database in a specific path, there is a configuration option ```path``` for that (might be missing from the documentation).
Author
Owner

@srebling commented on GitHub (Jan 22, 2023):

I added a path: "../../" property to the server settings and removed it from the dbnames. It is working now. Thanks for pointing that out. The main acebase engine docs do mention the path property, I overlooked it while trying out the server/client packages.

<!-- gh-comment-id:1399568887 --> @srebling commented on GitHub (Jan 22, 2023): I added a `path: "../../"` property to the server settings and removed it from the dbnames. It is working now. Thanks for pointing that out. The main acebase engine docs do mention the `path` property, I overlooked it while trying out the server/client packages.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-client#23
No description provided.