You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your project Javascript or Typescript:Javascript
The bug
When I am in DEBUG mode and stop on breakpoints, I encounter the following error, and the entire process stops. However, if I don't set breakpoints and only use console.log(...), everything proceeds as expected, without errors.
The error displayed when the system crashes is as follows:
Error: Undefined binding(s) detected when compiling WHERE. Undefined column(s): [t0.id] query: where t0.id = ?
But the "id" is provided correctly, and the user exists in the database.
What could explain that this error only occurs in debug mode, and when I run the project with 'npm run develop', for example, or without be stopped on breakpoints, I don't encounter any error?
-- More details to help understand the problem:
In the following image, you can see that the breakpoint is set after the three equivalent calls to the database. Everything works well, and I hit the breakpoint as expected, with the correct log appearing on the console.
Now, if I change the breakpoint to an upper level, as shown in the following image, and then stop at this breakpoint, attempting to proceed instruction by instruction will terminate the process upon the first call to the database. This occurs precisely at this breakpoint, regardless of the order of the three database calls.
The error I will have is the following:
/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:112
throw new Error(
^
Error: Undefined binding(s) detected when compiling WHERE. Undefined column(s): [t0.id] query: where t0.id = ?
at QueryCompiler_MySQL.toSQL (/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:112:13)
at compileCallback (/path_to_my_project/node_modules/knex/lib/formatter/formatterUtils.js:13:19)
at rawOrFn (/path_to_my_project/node_modules/knex/lib/formatter/wrappingFormatter.js:225:7)
at QueryCompiler_MySQL.whereWrapped (/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:1095:17)
at QueryCompiler_MySQL.where (/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:584:34)
at /path_to_my_project/node_modules/knex/lib/query/querycompiler.js:135:40
at Array.forEach ()
at QueryCompiler_MySQL.select (/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:134:16)
at QueryCompiler_MySQL.toSQL (/path_to_my_project/node_modules/knex/lib/query/querycompiler.js:75:29)
at Builder.toSQL (/path_to_my_project/node_modules/knex/lib/query/querybuilder.js:84:44)
The text was updated successfully, but these errors were encountered:
The bug
When I am in DEBUG mode and stop on breakpoints, I encounter the following error, and the entire process stops. However, if I don't set breakpoints and only use console.log(...), everything proceeds as expected, without errors.
The error displayed when the system crashes is as follows:
Error: Undefined binding(s) detected when compiling WHERE. Undefined column(s): [t0.id] query: where t0.id = ?
It seems to occur after this line of code:
But the "id" is provided correctly, and the user exists in the database.
What could explain that this error only occurs in debug mode, and when I run the project with 'npm run develop', for example, or without be stopped on breakpoints, I don't encounter any error?
--
More details to help understand the problem:
In the following image, you can see that the breakpoint is set after the three equivalent calls to the database. Everything works well, and I hit the breakpoint as expected, with the correct log appearing on the console.
Now, if I change the breakpoint to an upper level, as shown in the following image, and then stop at this breakpoint, attempting to proceed instruction by instruction will terminate the process upon the first call to the database. This occurs precisely at this breakpoint, regardless of the order of the three database calls.
The error I will have is the following:
The text was updated successfully, but these errors were encountered: