overextended / oxmysql

MySQL resource for FXServer.
https://overextended.dev/oxmysql
GNU Lesser General Public License v3.0
314 stars 192 forks source link

SCRIPT ERROR in promise (unhandled): TypeError: Cannot read properties of undefined (reading 'getConnection') #94

Closed Zaickz closed 2 years ago

Zaickz commented 2 years ago

Describe the bug After the update to 2.0.3 i have the following error, but the DB connection seems to be established correctly.

Code set mysql_connection_string "mysql://user:pw@localhost/redm_test?charset=utf8mb4"

    [      script:oxmysql] SCRIPT ERROR in promise (unhandled): TypeError: Cannot read properties of undefined (reading 'getConnection')
[      script:oxmysql] > rawTransaction (@oxmysql/dist/build.js:21729)
[      script:oxmysql] > Object.callback (@oxmysql/dist/build.js:21839)
[      script:oxmysql] 
.
.
.
. 
[      script:oxmysql] Database server connection established!

Server details

Database details

thelindat commented 2 years ago

Transactions executed during the first server tick were triggering before the connection pool was established. Fixed.

RenggoStarz commented 2 years ago

how to fix this problem [ script:oxmysql] SCRIPT ERROR in promise (unhandled): Error: Query expected a string but received object instead [ script:oxmysql] > parseArguments (@oxmysql/dist/build.js:21554) [ script:oxmysql] > rawQuery (@oxmysql/dist/build.js:21709) [ script:oxmysql]