[Release] MySQL Async Library - v3.0.6 Fxserver

dev
mysql
basemods

#487

It’s coming from esx_eden_garage, see: https://github.com/HumanTree92/esx_eden_garage/issues/5 just update it imo


#488

Update 3.0.6

  • Fixes multiple statements partially. See FrBillyD’s, (french) example on how to fix it. e.g.
local result = MySQL.Sync.fetchAll(Query .. Query2, Parameters)
return result[2][1]

when the second query is the select (hence the 2 in the result).

  • Debug print shows now the resource requesting the mysql-query.

#489

I am on a Linux Ubuntu 16.04, after installing your 2.1.1 (because you said linux needs 2.x versions) when I start my server I get this error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
  at System.Data.Common.DbConnectionOptions.GetKeyValuePair (System.String connectionString, System.Int32 currentPosition, System.Text.StringBuilder buffer, System.Boolean useOdbcRules, System.String& keyname, System.String& keyvalue) [0x000d4] in <1cab2ddf0fb2413491f2679cff202044>:0
  at System.Data.Common.DbConnectionOptions.ParseInternal (System.Collections.Generic.Dictionary`2[TKey,TValue] parsetable, System.String connectionString, System.Boolean buildChain, System.Collections.Generic.Dictionary`2[TKey,TValue] synonyms, System.Boolean firstKey) [0x0001c] in <1cab2ddf0fb2413491f2679cff202044>:0
  at System.Data.Common.DbConnectionOptions..ctor (System.String connectionString, System.Collections.Generic.Dictionary`2[TKey,TValue] synonyms, System.Boolean useOdbcRules) [0x00037] in <1cab2ddf0fb2413491f2679cff202044>:0
  at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString (System.String value) [0x00015] in <1cab2ddf0fb2413491f2679cff202044>:0
  at MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor (System.String connectionString) [0x00006] in <149068887d4e4bc08e7b4c05a59a923b>:0
  at MySQLAsync.MySQLAsync.Configure (System.String connectionStringConfig, System.Boolean debug) [0x00000] in <6f835765886c4fada3e5ffb1ffcd6998>:0
  at MySQLAsync.MySQLAsync.<.ctor>b__2_0 () [0x00047] in <6f835765886c4fada3e5ffb1ffcd6998>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <49fde7938a9b47b480042d844e818c7e>:0
   --- End of inner exception stack trace ---
 
 
Server stack trace:
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <49fde7938a9b47b480042d844e818c7e>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <49fde7938a9b47b480042d844e818c7e>:0
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <49fde7938a9b47b480042d844e818c7e>:0
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <49fde7938a9b47b480042d844e818c7e>:0
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <49fde7938a9b47b480042d844e818c7e>:0
  at CitizenFX.Core.FunctionReference.Invoke (System.Int32 reference, System.Byte[] arguments) [0x00061] in /src/code/client/clrcore/FunctionReference.cs:62
  at CitizenFX.Core.InternalManager.CallRef (System.Int32 refIndex, System.Byte[] argsSerialized, System.IntPtr& retvalSerialized, System.Int32& retvalSize) [0x00000] in /src/code/client/clrcore/InternalManager.cs:247
  at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.CallRef(int,byte[],intptr&,int&)
  at (wrapper xdomain-dispatch) CitizenFX.Core.InternalManager.CallRef(object,byte[]&,byte[]&,int,byte[],int&)
 
Exception rethrown at [0]:
  at (wrapper xdomain-invoke) CitizenFX.Core.InternalManager.CallRef(int,byte[],intptr&,int&)
  at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.CallRef(int,byte[],intptr&,int&)
  at CitizenFX.Core.MonoScriptRuntime.CallRef (System.Int32 refIndex, System.Byte[] argsSerialized, System.Int32 argsSize, System.IntPtr& retvalSerialized, System.Int32& retvalSize) [0x00013] in /src/code/client/clrcore/MonoScriptRuntime.cs:151
Error running system event handling function for resource mysql-async: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:665: An error happened while calling export mysql_configure of resource mysql-async (citizen:/scripting/lua/MessagePack.lua:830: missing bytes), see above for details
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:665: in method 'mysql_configure'
        lib/init.lua:3: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
hitch warning: frame time of 1369 milliseconds

Am I forgetting to install something? (It could be the resource Cops FiveM, thats the only one I have that uses mysql-async to my knowledge)


#490

Since 3.0.5, 3.x works fine.

The bug you are having was fixed in 2.1.2.


#491

Ah ok, thank you, I will change versions! :smiley:

You should probably remove that from the OP and the github readme


#492

Now I get this error when I join:

WARNING: NON-EXISTENT NATIVE 000000004d52fe5b
Error calling system call ref function in resource TODO: TypeError: Cannot read property 'query' of undefined
stack:
TypeError: Cannot read property 'query' of undefined
    at global.exports (mysql-async.js:4973:10)
    at citizen:/scripting/v8/main.js:75:40
Error running system event handling function for resource police: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:665: An error happened while calling export mysql_fetch_all of resource mysql-async (citizen:/scripting/lua/MessagePack.lua:830: missing bytes), see above for details
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:665: in method 'mysql_fetch_all'
        @mysql-async/lib/MySQL.lua:143: in field 'fetchAll'
        server/server.lua:115: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>

#493

This is get_invoking_resource. Either upgrade your server version or downgrade to 3.0.5


#494

Will do, thanks for the help!


#495

Ok, just updated to the latest server

Now I get this error:


Error: (node:98545) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '3' of null
    at parseConnectingString (mysql-async.js:5027:30)
    at global.on (mysql-async.js:5043:18)
    at citizen:/scripting/v8/main.js:193:28
Error: (node:98545) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:98545) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Just asking because I’ve had issues on here but because of this im wondering if it could be an issue with the addon I installed?

Error: (node:98545) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

#496

This is a parsing failure of the connection string. Try a 2.x connection string, like this:

set mysql_connection_string "server=localhost;uid=mysqluser;password=password;database=fivem"

#497


Help please what to do?


#498

use localhost instead of 127.0.0.1


#499

What do you mean? I used this ip 127.0.0.1


#500

127.0.0.01 is what you wrote. Stop trying to lie to me when it clearly says so in your screenshot. Now go and use localhost instead.