Error 403 while setting up new remote environment

Feature(s) impacted

Access to collections return 403 Forbidden.

Observed behavior

I first ran forest on my local database without issue, then when setting up on a remote environment, collections appear but I am not able to access records. No log error from the agent.

Expected behavior

The request to your server either failed or returned invalid data.

Failure Logs

Failed to load resource: the server responded with a status of 403 ()
errors: [{name: “ForbiddenError”, detail: “Forbidden”, status: 403}]

Context

  • Project name: LootR
  • Team name: Operations
  • Environment name: Production/staging (all don’t work)
  • Agent (forest package) name & version:
    @forestadmin/agent”: “^1.4.2”,
    @forestadmin/datasource-sql”: “^1.1.4”,
  • Database type: Postgres

Hello @0xBman,

Thanks for your detailed report.

Could you please navigate to your Project settings and verify that you have the rights to access the collections, in the roles configuration?

There is an issue with “liana_version”: “1.36.9”, I replaced the version manually in the .forestadmin-schema.json and it worked out

It’s strange that this simple difference explains the issue.

It seems that your schema file was not up to date: in production, schema files are not auto-generated. You need to generate them first on a development environment, and then deploy both the code and schema on the production environment.