Server wasn't able to start properly Strapi / Heroku / Postgresql

Hi Guys

So I deployed my last version of my strapi on heroku back in October 2020 and everything worked fine. Since last week, the backend crashed and it’s not working anymore. So I tried to restart it and I’m getting this error:

I use strapi with heroku as backend for my website and my website looks very ugly without content :slight_smile:

Has anyone had the problem yet? Can anyone help me?
Thank you

Kind regards, Adji

3 Likes

I was about to make some updates to my site and had the same issue. I think it has to do with:
https://help.heroku.com/VOGKZ7YO/postgres-database-connection-issues-ssl-off

From what I understand, they started enforcing SSL at the end of February. Which sounds fine, until I realized that the Heroku free tier (Hobby Dev) doesn’t allow for SSL. I am trying to find instructions on a work around, the most I have found so far is:

I scrolled to node.js, and did that:

Alternatively, you can omit the ssl configuration object if you specify the PGSSLMODE config var: heroku config:set PGSSLMODE=no-verify.

But so far it hasn’t worked…

related to:

And I got it to work (I’ll update if I run into any issues, so far I just loaded the strapi manager)


I did this

but now I’m getting this error:

That is not how you should add it, you have a syntax error there, even your linter doesn’t recongnize it.

Follow the postgreSQL documentation very closely.

You added quotes (") around ssl, that won’t work. If it still doesn’t work copy and paste the documentation example.

Yeah I recognized that and changed it, but I have another problem:

My error: “error Bootstrap function in plugin “documentation” failed”
“error TypeError: Cannot convert undefined or null to object”

I tried to reinstall node_modules and it didn’t work. Any help?

We will need more information to help you with that one, it appears to come from the strapi-plugin-documentation, did you change anything related to it since it last compliled? or maybe you updated something?

I fixed it, I just had to update strapi version in package.json

I have another problem. So my Production Strapi is online, but I can’t login with my username, because it is asking for a e-mail adress and I tried everything.

For local: I deleted ssl: { rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates }
out of config/database.js and when I start strapi locally the admin page is just empty.

I don’t know what to do. Please help me

You can put the rejectUnauthorized back, I don’t think that is the problem.

Check the migration guide because they added a mandatory env variable called ADMIN_JWT_SECRET. It may help

did not work