Skip to content

Common errors

The Dashboard cannot connect to the Data API

Section titled “The Dashboard cannot connect to the Data API”

Check, in this order:

  1. The Data API is running. Open <your-endpoint>/adminmate/api/config in your browser: you should get a JSON response with not_authorized. That means the Data API answers. If the page does not load, the Data API is not running or not reachable at this URL.
  2. The URL is right. Enter the base URL of the Data API in the environment settings, without /adminmate/api and without a trailing slash.
  3. HTTPS. Browsers block calls from https://app.adminmate.io to an http:// URL, except localhost. Serve your Data API over HTTPS. See Deployment.
  4. Reachability. The Data API is called from your browser, not from Adminmate servers. If it is on a private network, make sure your computer can reach it (VPN…).

The password you typed does not match the masterPassword of the Data API. Remember that each environment has its own master password, read from the AM_MASTER_PWD environment variable. Restart the Data API after changing it.

Your IP address is not in the authorizedIps list of the Data API.

If you are sure your IP address is in the list, your Data API probably runs behind a proxy or a load balancer, so it sees the IP address of the proxy. Configure Express accordingly, for example with app.set('trust proxy', 1). See IP filtering.

  • Your session expired (after 7 days) or the authKey changed: reload the page and enter the master password again.
  • The projectId does not match: the Data API is configured for another Adminmate project. Check AM_PROJECT_ID.
  • The secretKey is wrong: the permissions signed by Adminmate cannot be verified. Check AM_SECRET_KEY.

When Adminmate is added to an existing Express app, it must be registered before:

  • your authentication middlewares, which would reject the requests of the Dashboard;
  • your 404 handler, which would catch them first.
const app = express();
app.use(Adminmate.init({ /* ... */ })); // first
app.use(myAuthMiddleware);
app.use('/api', myRoutes);
app.use((req, res) => res.status(404).json({ message: 'Not found' }));
  • It must be listed in the models array of your configuration, with a model property.
  • Restart the Data API after adding it.
  • As a user, your team must have access to the model. See Access control.
  • Its target must match where you look: 'item' for the item page, 'bulk' for a selection in the list.
  • Its filter function must return something other than false for the selected records. On a selection, all the records must pass the filter.
  • As a user, your team must be allowed to use the action.

A date computed directly in the query of a segment is computed once, when the Data API starts. Use a getter. See Segments based on the current date.

Contact us from the chat on adminmate.io or at [email protected], with the error message and the version of the Adminmate package you use (npm ls | grep adminmate).