ForestAdmin/lumber

Update is not possible when using SSL

Ni0rd opened this issue · 5 comments

Ni0rd commented

Expected behavior

lumber update should update the app models

Actual behavior

lumber update crashes.

Failure Logs

> Cannot connect to the database due to the following error:
> SequelizeConnectionError: no pg_hba.conf entry for host "89.3.25.84", user "gexvagloeoizgi", database "d91aosrmq4610l", SSL off

Context

  • Lumber Package Version: 2.2.3
  • Database Dialect: postgres on heroku
  • Database Version: xx

I think the relevant part is :

lumber/lumber-update.js

Lines 25 to 28 in 6191eed

if (process.env.DATABASE_URL) {
config = await Prompter(program, [
'dbConnectionUrl',
]);

If you compare with the (working) lumber generate :

if (program.connectionUrl) {
config = await Prompter(program, [
'dbConnectionUrl',
'appName',
'ssl',
]);

I think the SSL option is not used.

I'm just trying out Lumber and ran into this - it's kind of concerning that such a simple bug has had no activity for a month...

Edit: I messed around and made a really bad fixed version if anyone needs it: yarn add global https://github.com/coffenbacher/lumber#devel. got confused which version I was running locally so there's some extra garbage in there but it works.

Hi guys, sorry for the late response.
Let me prioritise investigations on this issue for this week.

Sure, no problem. I think it's a really simple one, the suggested fix in the bug report basically worked for me.

Fixed in the new Lumber version (v2.3.5).
Thanks for your help guys!

Awesome, thank you @arnaudbesnier!