BUG - staging env not available

Feature(s) impacted

I am trying to use a staging env that I pushed to an ECS instance.

Observed behavior

The authentication seems to work on the hosted server, but then failed on forest admin side.

Expected behavior

We should be able to see our env in the forest admin app.

Failure Logs

Context

  • Project name: Trajaan
  • Team name: Ops
  • Environment name: staging
  • Agent (forest package) name & version:
    “meta”: {
    “liana”: “forest-express-sequelize”,
    “liana_version”: “8.5.14”,
    “stack”: {
    “database_type”: “postgres”,
    “engine”: “nodejs”,
    “engine_version”: “14.21.2”,
    “orm_version”: “5.15.2”
    }
  • Database type: postgre

Hello @Duportet,

Thanks for your feedback.

I can see that there is an HTTP request with an error. Can you click on the auth request and show the associated error?

Yes sure:
{
“errors”: [
{
“status”: 400,
“detail”: “Invalid client id”,
“meta”: {},
“name”: “InvalidClientIdError”
}
]
}

Ok, can you please copy/paste the parameter clientId sent with this request?

Yes sure:

eyJraWQiOiJ6d0VjbU5LVVpVTkdYUnlNRzZ2QUoyTTVfYzBoZGhfblBXS0hYWjhGUTFBIiwiYWxnIjoiUlMyNTYifQ.eyJ0b2tlbl9lbmRwb2ludF9hdXRoX21ldGhvZCI6Im5vbmUiLCJyZWRpcmVjdF91cmlzIjpbImh0dHBzOi8vYWRtaW4udHJhamFhbi5pby9mb3Jlc3QvYXV0aGVudGljYXRpb24vY2FsbGJhY2siXSwiYXBwbGljYXRpb25fdHlwZSI6IndlYiIsImdyYW50X3R5cGVzIjpbImF1dGhvcml6YXRpb25fY29kZSJdLCJyZXNwb25zZV90eXBlcyI6WyJjb2RlIl0sImVudmlyb25tZW50X2lkIjo3MTM1NiwiaXNzIjoiRk9SRVNUX0FVVEhFTlRJQ0FUSU9OX1NZU1RFTSIsImlhdCI6MTYyMDAyNjgxOH0.cnftsnvdGzilUXf6ydFmiMGlDo7fk1cMzqDzGrVBqhOD0t2vocKnt7OVFI-qN_ayPC0nzf7N08npydIKzu-3fYiLSMRbkSckDQT2ubT_vRZOEGb7o_MROt8tHlHEA5RZlWkZchbv0Sc8FtC8lQU5BYJfnJUaTRRNRLTefvR2TXCvEC-SLxEfZC9UFqm6cchkiNRQ3vtc61ZdDarve9fInW_LX0gky2A8y68QuCwKFkO2xue8P0sM1wni2c9CKK_dGHJezayaQUfruK56Fq33vC-_WzOq4yimsyBc6IlqHBKgWfVHyQ0A8GX8YmTG9XARvXwEsnw3ke4I0CyrtY5Uaw

Hello,

This client ID has been issued for the url https://admin.trajaan.io which does not match your environment’s URL.

Can you please check your .env configuration on your staging environment and verify that the variable APPLICATION_URL is correctly set to https://forestadmin.staging.trajaan.io?

1 Like

I have check both on was and directly on the machine, it is set to https://forestadmin.staging.trajaan.io.

Then, can you check that your environment secret ends with 89?

Yes the FOREST_ENV_SECRET=*************************89.

Did you define a static FOREST_CLIENT_ID for this installation? It could explain the issue.

If it’s the case, you can remove the value and restart the server.

Thanks it’s working, I have a new error now :slight_smile:
no pg_hba.conf entry for host ****
SSL off
at connection.connect.er…
SSL I enable though, I can check for pg_hba.conf.

Your postgresql database is responding that you don’t have the right to access it from your server, or with the given credentials.