Hi,
I’am trying to connect my app with database on server.
I copied : MySql.Data.dll, System.Data.dll, System.Drawing and I18N dlls to Plugin folder.
In Editor everithing is ok, connection string is ok, and stored procedures from db works properly, but after build app via web gl there is an error when I trying to create istane of MySqlConnection.
public class Db: MonoBehaviour
{
private const string connectionString = "Server=name;
Database=xxx; UserId=xxx; Password=xxx";
// connection object
MySqlConnection con = null;
void Awake()
{
try
{
con = new MySqlConnection(connectionString);
con.Open();
Debug.Log("Connection State: " + con.State);
}
catch (Exception ex)
{
Debug.Log(ex.ToString());
}
}
}
I was trying to use Unity 2017, 5.50b11, 5.42f2
An error occured running the Unity content on this page.
An error occured running the Unity content on this page. See your browser’s JavaScript console for more info. The error was:
uncaught exception: abort(111) at jsStackTrace@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1056:12
stackTrace@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1070:21
abort@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2455486:43
nullFunc_iiii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:15480:2
b111@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2438188:1
__ZN16VirtFuncInvoker1IP24ObjectU5BU5D_t3614634134bE6InvokeEjPvb [Invoke? VirtFuncInvoker1<bool*>(unsigned int, void*, bool)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2227555:1
_MySqlConnectionStringBuilder_AddKeywordFromProperty_m3073566240@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1032859:1
_MySqlConnectionStringBuilder_Initialize_m3878957688@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1670492:1
_MySqlConnectionStringBuilder__cctor_m1042839471@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1962630:1
_Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2 [RuntimeInvoker_Void_t1841601450?2(void**, undefined?S?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2375975:1
dynCall_iiii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2391914:1
invoke_iiii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:16492:10
__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke?5(void**, undefined?S?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2048135:1
__ZN6il2cpp2vm7Runtime9ClassInitEP11Il2CppClass [il2cpp::vm::Runtime::ClassInit(Il2CppClass?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1244147:1
__ZN6il2cpp2vm6Object16NewAllocSpecificEP11Il2CppClass [il2cpp::vm::Object::NewAllocSpecific(Il2CppClass?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2036997:1
__ZN6il2cpp2vm6Object3NewEP11Il2CppClass [il2cpp::vm::Object::New(Il2CppClass?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2408539:1
_MySqlConnection__ctor_m3808450558@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2108894:1
_MySqlConnection__ctor_m3613524180@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2354919:1
dynCall_viii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2399630:1
invoke_viii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:16308:3
_MySQLCS_Awake_m3895412228@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1243601:1
_Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2 [RuntimeInvoker_Void_t1841601450?2(void**, undefined?S?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2375975:1
dynCall_iiii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2391914:1
invoke_iiii@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:16492:10
__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke?5(void**, undefined?S?)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2048135:1
_il2cpp_runtime_invoke@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2316460:1
__Z23scripting_method_invoke21ScriptingMethodIl2CppP15ScriptingObjectR18ScriptingArgumentsPP18ScriptingExceptionb [scripting_method_invoke?2()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2159309:1
__ZN19ScriptingInvocation6InvokeEPP18ScriptingExceptionb [ScriptingInvocation::Invoke(bool**)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1651100:1
__ZN19ScriptingInvocation6InvokeEPP18ScriptingException [ScriptingInvocation::Invoke(ScriptingException?**)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2376981:1
__ZN25ScriptingInvocationNoArgs13InvokeCheckedEv [ScriptingInvocationNoArgs::InvokeChecked()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2224158:1
__ZN13MonoBehaviour9CallAwakeEv [MonoBehaviour::CallAwake()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1645429:1
__ZN13MonoBehaviour12AddToManagerEv [MonoBehaviour::AddToManager()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1527525:1
__ZN9Behaviour13AwakeFromLoadE17AwakeFromLoadMode [Behaviour::AwakeFromLoad?1()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2114131:1
__ZN13MonoBehaviour13AwakeFromLoadE17AwakeFromLoadMode [MonoBehaviour::AwakeFromLoad?1()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1116289:1
__ZN18AwakeFromLoadQueue28InvokePersistentManagerAwakeEPNS_4ItemEj17AwakeFromLoadMode [AwakeFromLoadQueue::InvokePersistentManagerAwake?1(AwakeFromLoadQueue::Item, unsigned int)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1514375:1
__ZN18AwakeFromLoadQueue30PersistentManagerAwakeFromLoadEv [AwakeFromLoadQueue::persistentManagerAwakeFromLoad()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2114632:1
__ZN18LoadSceneOperation21CompleteAwakeSequenceEv [LoadSceneOperation::CompleteAwakeSequence()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1761793:1
__ZN18LoadSceneOperation25PlayerLoadSceneFromThreadEv [LoadSceneOperation::playerLoadSceneFromThread()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:675202:1
__ZN18LoadSceneOperation19IntegrateMainThreadEv [LoadSceneOperation::IntegrateMainThread()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1555292:1
__ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsEi [PreloadManager::UpdatePreloadingSingleStep?N()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1652884:1
__ZN14PreloadManager35WaitForAllAsyncOperationsToCompleteEv [PreloadManager::WaitForAllAsyncOperationsToComplete()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2116478:1
__ZN19RuntimeSceneManager9LoadSceneERK8UnityStrS2_S2_RK9UnityGUIDiNS_11LoadingModeE [RuntimeSceneManager::LoadScene?2(UnityStr?S?&)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2032441:1
__Z21PlayerStartFirstSceneb [PlayerStartFirstScene(bool)]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:910201:1
__Z20PlayerLoadFirstScenev [PlayerLoadFirstScene()]@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:1991534:1
_main@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:922588:1
asm._main@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2453331:9
callMain@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2455394:13
doRun@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2455430:40
run/<@blob:null/4b3ba033-faff-4a2e-be37-6edc79724623:2455439:4