How Do I Fix 'Metadata Load Error' in AGE Viewer?

260 views Asked by At

When using npm start to start AGE Viewer, I get the following error in my terminal.

Error: Not connected
    at _callee4$ (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:64:19)
    at tryCatch (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
    at Generator.<anonymous> (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
    at Generator.next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21)
    at asyncGeneratorStep (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
    at /home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7
    at new Promise (<anonymous>)
    at apply (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:12)
    at getMetadata (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:66:6)
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "POST /api/v1/db/meta HTTP/1.1" 500 51
 {"timestamp":"2023-08-05 05:50:51"}
Error: Not connected
    at _callee3$ (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:54:19)
    at tryCatch (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
    at Generator.<anonymous> (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
    at Generator.next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21)
    at asyncGeneratorStep (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
    at /home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7
    at new Promise (<anonymous>)
    at apply (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:12)
    at getStatus (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:56:6)
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "GET /api/v1/db HTTP/1.1" 500 51
 {"timestamp":"2023-08-05 05:50:51"}
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "GET /api/v1/miscellaneous HTTP/1.1" 304 -
 {"timestamp":"2023-08-05 05:50:51"}

Still, AGE Viewer runs just fine on port 3000.

Now, I'm trying to connect to my database on Viewer, and I get the error 'Metadata Load Error'. Error message shown in AGE Viewer

I also noticed that information about my graphs, nodes, and edges are missing. Clicking the dropdown to select Current Graph does not show any of my graphs.

I expected that information about the existing graphs, nodes, and edges in the database were displayed, and that there were no errors on connection to my database.

7

There are 7 answers

0
Sarthak On BEST ANSWER

The error may be happening because you are using pg version > 12. In that case there should be a .version sql file in the backend folder of age-viewer. Because there's a code to fetch the sql version and match it with the .sql file, without which metadata endpoint will not give proper response, and so graph will also not load.

0
adil shahid On

The error is pointing to databaseController.js file of AGE backend and you need to check:

  • Database Driver
  • Database credential configuration

So, you need to review the above mentioned driver and database configuration to solve this metadata load error.

0
Tito On

A postgres process should be running before you start AGE Viewer. The steps should be as follows:

  • Start a Postgres process
  • cd into the AGE Viewer directory and run npm run start
  • Connect to database on AGE Viewer.

Ensure the details of the postgres process match the details entered in AGE Viewer.

0
Mohayu Din On

You may have forgotten to start the PostgreSQL server before running AGE Viewer

cd path/to/postgresql
bin/pg_ctl -D <cluster_name> -l logfile start

cd path/to/age-viewer
npm run start
0
Vinay Kumar Talreja On

Make sure to run the Postgres server before running AGE-Viewer by using

bin/pg_ctl -D demoDataBase -l logfile start

and then cd into the age-viewer repository and run this commmand

npm run start

Lastly, in this part (photo) check both the credentials are exact same.

picture

0
Marcos Silva On

run the postgresql server before start the age-viewer project:

bin/pg_ctl -D demo -l log start

make sure that you are inside the age-viewer directory before run the npm run start command.

0
Ammar Baig On

This error may be happening because of your pg version. May be its greater than 12. Make sure to check the version or You may have forgotten to start the PostgreSQL server before running AGE Viewer.

cd path/to/postgresql
bin/pg_ctl -D <cluster_name> -l logfile start

cd path/to/age-viewer
npm run start