Custom Query JSON Error on Execute for Schema

It's a very similar error to this topic, but I created a new topic.

What mikkime23 and I have in common is that we used the json_object method (json_build_object in postgresql). It works well until run a custom query that contains that method, but all custom queries do not work after the query that contains the thawing method fails.

I use a translator because I can't speak English. Please understand even if it's awkward.

Hey all,

Are custom queries still nerfed? I’m trying to do a simple query with a custom sort.

Currently on 5.0.2


I’m trying the below queries and I keep getting the same error.

image

Even doing SELECT * FROM guardians gives me the same error.

Below are the logs:

[2022-08-17 23:23:22.650] START inspectConnectionFile, fileName=db, siteName=undefined, target=undefined
[2022-08-17 23:23:22.663] OPEN popup: PopupWindow_1660742602661
[2022-08-17 23:23:22.663] save window state, type=databaseCustomQuery
[2022-08-17 23:23:22.661] CALL NW window: file:///C:/Users/micha/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/commands/dmxDatabaseCustomQuery.htm?theme=dark&app=true&noinit=true
[2022-08-17 23:23:22.685] got child state: 1
[2022-08-17 23:23:22.651] inspect=file:///C:/Users/micha/Documents/Wappler/SSA-CRM/app/modules/connections/db.json
[2022-08-17 23:23:22.932] NW PRELOAD script ....
[2022-08-17 23:23:22.658] START inspectConnectionFile, fileName=db, siteName=undefined, target=undefined
[2022-08-17 23:23:22.933] IS_BETA=false
[2022-08-17 23:23:23.088] initUI - Database Custom Query
[2022-08-17 23:23:22.659] inspect=file:///C:/Users/micha/Documents/Wappler/SSA-CRM/app/modules/connections/db.json
[2022-08-17 23:23:23.088] args= {
  property: {
    name: 'defineQuery',
    optionName: 'sql',
    title: 'Build Query',
    type: 'button',
    required: true,
    command: 'dmxDatabaseCustomQuery',
    commandNameParameter: 'databaseAction',
    dialogTitle: 'Database Custom Query',
    dialogType: 'databaseCustomQuery',
    dialogWidth: 950,
    dialogHeight: 600,
    value: '',
    actionType: 'dbcustom_query',
    actionData: {
      name: 'custom',
      module: 'dbupdater',
      action: 'custom',
      options: [Object],
      output: true
    },
    allValues: [],
    _fieldName: 'defineQuery'
  },
  serverType: 'node',
  dialogTitle: 'Database Custom Query',
  dialogType: 'databaseCustomQuery',
  dialogWidth: 950,
  dialogHeight: 600,
  data: {
    actionList: { settings: [Object], meta: [Object], exec: [Object] },
    basePath: '',
    isParentRepeat: null,
    serverType: 'node'
  },
  action: 'new'
}
[2022-08-17 23:23:23.090] START inspectConnectionFile, fileName=db, siteName=undefined, target=undefined
[2022-08-17 23:23:23.091] inspect=file:///C:/Users/micha/Documents/Wappler/SSA-CRM/app/modules/connections/db.json
[2022-08-17 23:23:23.092] initLayout
[2022-08-17 23:23:23.186] START getConnectionSchema ...
[2022-08-17 23:23:31.333] SAVE CUSTOM QUERY filepath: @@currentProjectRoot@@/app/api/__exec_query.json
[2022-08-17 23:23:32.052] try again ...
[2022-08-17 23:23:32.403] try again ...
[2022-08-17 23:23:32.771] try again ...
[2022-08-17 23:23:33.136] try again ...
[2022-08-17 23:23:33.500] try again ...
[2022-08-17 23:23:33.858] try again ...
[2022-08-17 23:23:34.233] try again ...
[2022-08-17 23:23:34.612] try again ...
[2022-08-17 23:23:34.971] try again ...
[2022-08-17 23:23:35.343] try again ...
[2022-08-17 23:23:35.400] didn't complete in 10 times ...
[2022-08-17 23:24:31.612] SAVE CUSTOM QUERY filepath: @@currentProjectRoot@@/app/api/__exec_query.json
[2022-08-17 23:24:32.284] try again ...
[2022-08-17 23:24:32.643] try again ...
[2022-08-17 23:24:33.002] try again ...
[2022-08-17 23:24:33.359] try again ...
[2022-08-17 23:24:33.716] try again ...
[2022-08-17 23:24:34.102] try again ...
[2022-08-17 23:24:34.461] try again ...
[2022-08-17 23:24:34.834] try again ...
[2022-08-17 23:24:35.205] try again ...
[2022-08-17 23:24:35.563] try again ...
[2022-08-17 23:24:35.636] didn't complete in 10 times ...

Cheers
Michael

I’m going to bump this. Still same error.

With the new custom query stuff in 5.1.5, I was hoping this would be fixed, however, still getting the same issue. I haven’t been able to use custom queries for months.

I think you have a very different problem. Seems like the generated server connect API call for the database test is just unavailable and can not be run. Or it takes too long time to run. This can be because each time the nodejs server running in docker has to be restarted to load the new query.

So if you have a large site it might take much longer.

Anyway we will be implementing new ways of executing database queries more directly to the database and not like now through the web server.

So hope this will be soon improved.

I can confirm that this has now been fixed! Thank you so much!

Fixed in Wappler 5.2.0