Upgrade to v9 not working

Observed behavior

A red banner appears at the top of the portal that reads The agent version on which your project is running (v8.4.8) will soon reach its end-of-life and needs to be upgraded. Our backend is hosted on an EC2 instance. I performed the following steps to upgrade to v9:

  1. SSH into our dev EC2 instance
  2. Switch to root user
  3. Change directories to ~/portal
  4. Ran npm install “forest-express-sequelize@^9.0.0”
  5. Killed the process running the express app
  6. Ran npm start
  7. Refreshed the UI and still observed the red banner and saw that “Agent Version” was still 8.4.8

Other things we tried/observed:

  • I did a “cat .forestadmin-schema.json” and saw that meta.liana_version was still 8.4.8
  • We also tried rebooting the EC2 instance but did not see desired behavior
  • Tried removing the package-lock.json and tried the npm install again

Expected behavior

After following steps 1-6 above I was expecting the red banner to go away and the Agent Version to be updated to 9.3.10


  • Project name: charitywater
  • Team name: Twisthink
  • Environment name: Test
  • Agent (forest package) name & version: current is 8.4.8
  • Database type: postgres
  • Recent changes made on your end if any: ran npm install “forest-express-sequelize@^9.0.0” and restarted server

Does NODE_ENV is equal to “production”?

To upgrade your agent and propage the upgrade to your .forestadmin-schema.json you should not be in production environment because the schema is not re-generated in production due to performance reasons. The recommended process is to upgrade agent in environment development, start agent (will trigger the .forestadmin-schema.json updates) and commit everything to push it on production. If you don’t have development environment (not recommended) you must change NODE_ENV to development and restart your agent and switch again NODE_ENV to production.

Tell me if this message helps you :pray:

Please forgive me as I am not very experienced with forest admin technologies. I do not understand the steps you recommended to upgrade the agent in the development environment.

More context

Our environments we have are as follows:

  • Development
  • Test
  • Staging
  • Production

The Development environment’s backend URL points to http://localhost:3310. When I go to Project Settings > Environment > Development, the Agent Version does appear to be 9.3.10. If I understand correctly, I have upgraded the agent successfully in our Development environment by running the backend on my local machine with the latest agent installed (9.3.10).


My goal now is to get the Test environment, whose backend URL points to an Amazon EC2 hosted backend, to have the same agent (9.3.10). I’d like to propagate to Staging and Production once I’ve verified the change looks good in our Test environment.

What should next steps be to propagate this to our Test environment? I am looking at the docs here but I don’t fully understand what I need to do. If I am simply trying to update the agent, do I need to create a branch? How do I “commit everything to push it on production”?



The Development workflow is not useful to upgrade your agent.
Once you have upgraded your agent version in development, you should commit the code changes (packages.json, source code, .forestadmin-schema.json etc.) to push it on production/Staging/Test. Pull the code in each server, install, build and restart server as if you were updating a library. That’s all.

Thanks Alban, this process worked!


1 Like

great ! :innocent: Have a good time with forest.