Issues going from forest-express-sequelize 3.1 to 6.1

We have the forestadmin integrated into our web application instead of deploying it as a separate application. Everything worked as expected in all environments when we were running forest-express-sequelize 3.1. We recently went from forest-express-sequelize 3.1 to 6.1. Everything works smoothly in a local environment. We are able to navigate to run our application and also able to use forestadmin on the locally hosted application. When we deploy to our staging and production environment on Heroku, forestadmin breaks. When forestadmin makes its xhr to get a data view, it gets the HTML of our client application returned instead of getting JSON data from the forest API endpoint in our application. Here is a summary of our environment and the observed results.

  • We recently went from forest-express-sequelize 3.1 to 6.1
  • We made the change to use async/await described in the documentation
  • Then we saw a CORS issue
  • We then made changes in our code to allow CORS from app.forestadmin.com described in the support forum
  • We are now getting a parsing error because the HTML of our application is being returned instead of the JSON expected from the forest API endpoint expected from our application

Please provide us with any guidance that you can on fixing the issue in 6.1.

Thanks
Derek

Please provide any relevant information about your setup.

  • Package Version: 6.1
  • Express Version: ^4.16.1
  • Sequelize Version: 4.44
  • Database Dialect: PostgreSQL
  • Database Version: 12
  • Project Name: Pactful

Hi @Derek_Frempong ! Welcome to the community :slight_smile:
Sorry to hear about your troubles, upgrading is always a hell of a task !
Did you follow all the intermediates upgrade steps (v3 to v4, then v4 to v5, then v5 to v6) ?
Here are the links:




Thanks for providing the links. I’ll review them and see if there are any steps that I missed in the upgrade. Aside from that, is there anything fundamentally wrong with running the forestadmin app as part of my application as opposed to running it as a separate app?

Hi @Derek_Frempong,

There is nothing fundamentally wrong with having your application running directly into your project instead of a separate app.

However, when generating a new project, some config files and ForestAdmin dedicated files are also created. Plus our tools are crafted to work mainly on project generated by Lumber (separated app).

To conclude you can run it onto your existing app but the ForestAdmin experience is better suited for standalone apps.

Thank you. I appreciate your time and guidance.

@anon37102731 - This is very helpful information. Can you elaborate on how the experience might be better if the apps are separated?