Fixed in Wappler 3.5.1
Guys
I updated to 3.5.1 and still got this error when inserting a register (simple sign up form).
Iâm using nodejs + docker on Mac OS Catalina. Itâs brand new web app, created using version 3.5.1
Message from Chrome Dev Tools:
{status: "500", message: "knex: Required configuration option 'client' is missing.",âŠ}
message: "knex: Required configuration option 'client' is missing."
stack: "Error: knex: Required configuration option 'client' is missing.â” at new Client (/opt/node_app/node_modules/knex/lib/client.js:54:11)â” at Knex (/opt/node_app/node_modules/knex/lib/knex.js:53:28)â” at App.setDbConnection (/opt/node_app/lib/core/app.js:206:25)â” at App.connect (/opt/node_app/lib/modules/dbconnector.js:8:14)â” at App._exec (/opt/node_app/lib/core/app.js:393:57)â” at App.exec (/opt/node_app/lib/core/app.js:335:20)â” at App._exec (/opt/node_app/lib/core/app.js:354:25)â” at async App._exec (/opt/node_app/lib/core/app.js:364:17)â” at async App.exec (/opt/node_app/lib/core/app.js:335:9)â” at async App.define (/opt/node_app/lib/core/app.js:318:9)"
status: "500"
Seems your db connection setting is wrong. Did you edit something in it manually? Just check the server connect db connection and reapply it.
Hello @George!
Did you edit something in it manually?
No! I didnât
Just check the server connect db connection and reapply it.
The connection is working, I already created tables.
Just for the record there are two types of connections - one direct connection for Wappler and itâs database manager and one for server connect that will access the database from your website
So yes your direct connection for Wappler seems to be working but there is a problem with the server connect one.
I too get the following with 3.5.5
{âstatusâ:â500â,âmessageâ:âknex: Required configuration option âclientâ is missing.â,âstackâ:âError: knex: Required configuration option âclientâ is missing.\n at new Client (/opt/node_app/node_modules/knex/lib/client.js:55:11)\n at Knex (/opt/node_app/node_modules/knex/lib/knex.js:53:28)\n at App.setDbConnection (/opt/node_app/lib/core/app.js:202:25)\n at App.connect (/opt/node_app/lib/modules/dbconnector.js:8:14)\n at App._exec (/opt/node_app/lib/core/app.js:384:57)\n at App._exec (/opt/node_app/lib/core/app.js:355:28)\n at async App.exec (/opt/node_app/lib/core/app.js:324:9)\n at async App.define (/opt/node_app/lib/core/app.js:314:9)â}
edited my db.json to client instead of type
This error was solved in Wappler 3.5.5 - but you probably have wrong database connections, so just reapply them.
Wrong database connections?
I have today deleted the existing database, created a new one, created the tables, again, rebuilt the server connect queries.
And still I get the error.
I checked the Wappler Local and Docker db.json
Local says
âdirectâ: true,
âclientâ: âmysqlâ,
the docker one
âdirectâ: true,
âtypeâ: âmysqlâ,
Iâm not sure if this helps or not, but in your last post, I still see âtypeâ: âmysqlâ.
Hi @scott
Yes, it was apparently fixed in 3.5.5 though
I have manually amended the db.json to client instead of type and still errors
This is what I was referring to. I donât know for sure that is the cause of the error, but from reading the posts above, it seems like it could be.
The docker one says
{
âdirectâ: true,
âclientâ: âmysqlâ,
âconnectionâ: {
âhostâ: âXXX.XXX.XXX.XXâ,
âportâ: 9906,
âuserâ: ârootâ,
âpasswordâ: â***********â,
âdatabaseâ: âmydbâ
},
Maybe just reapply your project settings so that the right docker connections get generated.
Just open the project settings and save them.
And then redeploy your docker and check how the connections are generated.
I redeployed docker to digital ocean. Still getting the error.
I even went to the extent of creating a new droplet and deploying to that target and even rebuilt the DB.
Wappler set the db.json to âtypeâ again for the Droplet.
I have manually changed to âclientâ and updated/redeployed.
But still getting
{âstatusâ:â500â,âmessageâ:âknex: Required configuration option âclientâ is missing.â,âstackâ:âError: knex: Required configuration option âclientâ is missing.\n at new Client (/opt/node_app/node_modules/knex/lib/client.js:55:11)\n at Knex (/opt/node_app/node_modules/knex/lib/knex.js:53:28)\n at App.setDbConnection (/opt/node_app/lib/core/app.js:202:25)\n at App.connect (/opt/node_app/lib/modules/dbconnector.js:8:14)\n at App._exec (/opt/node_app/lib/core/app.js:384:57)\n at App._exec (/opt/node_app/lib/core/app.js:355:28)\n at App.exec (/opt/node_app/lib/core/app.js:324:20)\n at App.define (/opt/node_app/lib/core/app.js:314:20)â}
Is there anything else I can try as both db.json stated âclientâ and not âtypeâ?
So I switched off experiment mode
Now I get
when I ls files on my docker webserver its definitely there.
root@ff4e177ce933:/opt/node_app/app/modules/connections# ls
db.json
Thoughts please @George as I really could do with this working.
Thanks in advance
@George, @patrick - I can confirm this has returned for me - but only on my remote server (db still contained within Docker). The db.json file correctly states client, and not type.
Can we get a review/update on this please, as it is affecting a lot of people.
UPDATE:
In the signup workflow that was failing, it is quite long, so I went through it all and removed ANY trace of the actions that are now replaced by global (removed DB connection, that I thought I needed prior to validate - as the validate step looked erroneous without), security provider etc⊠and itâs now working.
@George - when you have validate, it does ask you to select the DB, which you canât unless itâs in the actual SC, however it does seem to work if you just ignore it. (I reported this elsewhere).