Repository navigation
Description
Bug report
Describe the bug
When attempting to authenticate a user with username and password in a Unity WebGL build running in a web browser a RuntimeError: null function or function signature mismatch error is thrown and the Unity WebGL app stops
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create a new project in Unity (FWIW I'm using Unity 6000.0.41f1)
- Install NuGet for Unity (https://github.com/GlitchEnzo/NuGetForUnity)
- Install Supabase (v1.1.1) via NuGet package settings within Unity
- Implement flow for intialisation and user authentication via email and password
- Build and run on the WebGL platform
- Attempt to authenticate the user
Expected behavior
The user is authenticated and no runtime errors are thrown
Screenshots
Callstack of the error displayed in the console:
Browser_mainLoop_scheduler_rAF @ Development.framework.js:5833
Browser_mainLoop_runner @ Development.framework.js:5922
Development.framework.js:4503 RuntimeError: null function or function signature mismatch
at il2cpp::icalls::mscorlib::System::Runtime::InteropServices::Marshal::PtrToStructure(:54518/long, Il2CppReflectionType*) (http://localhost:54518/Build/Development.wasm)
at Marshal_PtrToStructure_m235E141E21BFB69A01B07DDDF1702BA7D5723AC3 (Development.wasm:0x58c8d97)
at Marshal_PtrToStructure_TisRuntimeObject_mAFC160D8333711F9FE85A7C91B1BD048C32A8837_gshared (Development.wasm:0x4c71069)
at UnityTls_get_NativeInterface_m0B8B1D4A4F73BE68A2E945017CE920053325F1D1 (Development.wasm:0x3f261d6)
at UnityTls_get_IsSupported_mAC3292C1269D67A455C0D70E878931123D75DE6D (Development.wasm:0x3f26764)
at MonoTlsProviderFactory_InitializeProviderRegistration_m1D24100D1C54F7529B4432D69EAE8EBCB3116B10 (Development.wasm:0x3f47115)
at MonoTlsProviderFactory_InitializeInternal_m719BE4475DBBA40EB7E0BBF3C3D65F17791E488A (Development.wasm:0x3f3e3e8)
at MonoTlsProviderFactory_GetProviderInternal_m08BDCDD3919FBAEDFB32CB5F0876D10E32C147A7 (Development.wasm:0x3f3dc16)
at MonoWebRequestHandler_CreateWebRequest_mBB805D3B8032C3CB3B2D71E04E3C319F0E627D1F (Development.wasm:0x5200ee4)
at U3CSendAsyncU3Ed__99_MoveNext_mD015CC1B55C285519224F811D1CA69F527F8F633 (Development.wasm:0x5205c5f)
at AsyncTaskMethodBuilder_1_Start_TisU3CSendAsyncU3Ed__99_t7F65CEF5874E988C0C5867B0B6EA5E52FBF3DB22_mA4F41AC898AFC342AA04CBC328540329A15BB400_gshared (Development.wasm:0x48da3cd)
at MonoWebRequestHandler_SendAsync_m218FBC412C4300E40FF988645B1BF648580D5B2F (Development.wasm:0x5204cf8)
at HttpClientHandler_SendAsync_m024FF40EDC1A14211704DB0DE00BCB7B9E9FD406 (Development.wasm:0x51fffb2)
at HttpMessageInvoker_SendAsync_m6713036B5D094D1E178CCB6B90975808CE1AEE1C (Development.wasm:0x520adf1)
at U3CSendAsyncWorkerU3Ed__47_MoveNext_mE32A14C1E715F40E33134DD8478CDFA53F9B0195 (Development.wasm:0x520b147)
at AsyncTaskMethodBuilder_1_Start_TisU3CSendAsyncWorkerU3Ed__47_tB6556DD755EDCDAD5DC1F1C5F5CA314BA5B282A5_m0B8B43F67B798C7EF2B0D99B5BAC790EB8FC918D_gshared (Development.wasm:0x48d7588)
at HttpClient_SendAsyncWorker_m705970670309B586A349D3D8E0A6F7FC41866656 (Development.wasm:0x520a7cd)
at HttpClient_SendAsync_m5C9B076F873C5D2F4E5301937A1AFE3427346E71 (Development.wasm:0x5209f39)
at HttpClient_SendAsync_m3CDC42E7D95E1A6827E17C613F75DB4A39F06FFD (Development.wasm:0x52099ee)
at U3CMakeRequestU3Ed__7_MoveNext_m2F4B9E3798068C9C58FC6A52F2B596F6F7C5D7F8 (Development.wasm:0x31bede2)
at AsyncTaskMethodBuilder_1_Start_TisU3CMakeRequestU3Ed__7_t5BF689D661DF3CAE0D12BB4EC70F7C8B3F9E23E7_mB9D6185572EBB4FFFC7634DBDCD9B77029BC4C77_gshared (Development.wasm:0x48d6f7f)
at Helpers_MakeRequest_m961141251A91BCEBD8E3B355A87CBEDA727DD15B (Development.wasm:0x31a16ab)
at U3CMakeRequestU3Ed__6_1_MoveNext_m7067E347F5828EB13A0416E0EC5F33DF6DA2637E_gshared (Development.wasm:0x3870f15)
at AsyncTaskMethodBuilder_1_Start_TisU3CMakeRequestU3Ed__6_1_t55B4B4061D3D249BE501EAB922EDF75E3880D207_mBAAA7F0F08099E7009475C84EB509CCD4470192A_gshared (Development.wasm:0x48d161a)
at Helpers_MakeRequest_TisRuntimeObject_mD855B55DAD6FEAC578DCD01D0D310982A79DA401_gshared (Development.wasm:0x56b4fc8)
at Api_SignInWithEmail_m77270054153C8E9271A822413116CB08C6C2C919 (Development.wasm:0x319f82b)
at U3CSignInU3Ed__36_MoveNext_m9771E96D7655028FECC455082000CE7F607BDC26 (Development.wasm:0x31b77ba)
at AsyncTaskMethodBuilder_1_Start_TisU3CSignInU3Ed__36_t28BE094A02A7A323A48F3DB6830C5D1BB7798408_m425D2123AFAD868DB51C6A91DC5C9EEF576E6C0A_gshared (Development.wasm:0x48d5558)
at Client_SignIn_m954A0D778ED2A737430544AABBD67322B541CA35 (Development.wasm:0x31ac1e0)
at Client_SignIn_m664F27C781E4A145B1CD69503322610EDC597B49 (Development.wasm:0x31ac057)
at U3CSignInU3Ed__8_MoveNext_mCE05E0B385DC7F176D0ED6F0E0A0B539C9089FB8 (Development.wasm:0x5e46e92)
at AsyncTaskMethodBuilder_1_Start_TisRuntimeObject_m4CC6B9A3F0DD032BDFC0B8416CE27980382ED173_gshared (Development.wasm:0x48d230c)
at SupabaseManager_SignIn_mADEB6B4D04D75C984C1C218C7471A094BFD9CDC9 (Development.wasm:0x5e3e482)
at U3CSignInU3Ed__11_MoveNext_mDEF6DC68B9DC198BABA7B65A764F1D3D26C322EC (Development.wasm:0x5e9259b)
at AsyncTaskMethodBuilder_Start_TisRuntimeObject_mEFE065A20533413CD8BB8FAEAF761102588337FB_gshared (Development.wasm:0x422bfd4)
at UserManager_SignIn_mE026A01CC9C8D3490EBF3950EF827E906D8814E2 (Development.wasm:0x5e910a9)
at U3COnSignInConfirmButtonPressedU3Ed__21_MoveNext_m2F3F2EEE6C376D6946FDB2110926330970AD2C9E (Development.wasm:0x5e34972)
at AsyncVoidMethodBuilder_Start_TisRuntimeObject_m3CA145CBB6CFE8B4ADD6148BF98E85899F95DCEA_gshared (Development.wasm:0x423ef7a)
at LoginUI_OnSignInConfirmButtonPressed_m0911A845BC95537E745C5559F21371298CE5C97E (Development.wasm:0x5e3399b)
at InvokableCall_Invoke_m6F4828FD2B3E3BBB7AA6EECC2C37FB08538363F4 (Development.wasm:0x54811c2)
at UnityEvent_Invoke_mFBF80D59B03C30C5FE6A06F897D954ACADE061D2 (Development.wasm:0x5485a48)
at Button_Press_mEF76F32CD5C01C1D8B00B80BDFC0C6CEEEF2C993 (Development.wasm:0x2883af4)
at Button_OnPointerClick_mB76B80D7374811C7BBE11DA188E2656904AE5422 (Development.wasm:0x2883bd0)
at ExecuteEvents_Execute_m512ACDD06180A73819570FED3C2BEE0F0E2DA3F2 (Development.wasm:0x290793e)
at EventFunction_1_Invoke_m98A8A653E7180305E41F7CFFDDD9D32C63B96FE7_OpenStatic(:54518/EventFunction_1_t297B5C47242D1B98BEC955E2804FA142B43E7927*, Il2CppObject*, BaseEventData_tE03A848325C0AE8E76C6CA15FD86395EBF83364F*, MethodInfo const*) (http://localhost:54518/Build/Development.wasm)
at ExecuteEvents_Execute_TisRuntimeObject_mDC4455B743BE4A6BA46DD741D0E0AB150FF1209A_gshared (Development.wasm:0x42e4a48)
at StandaloneInputModule_ReleaseMouse_mC5C3083C356ACD5CD420A58662D99A6CACC5FAF5 (Development.wasm:0x2912284)
at StandaloneInputModule_ProcessMousePress_m24665E707FEF5C80719847D62A8A8AEABE27C6C5 (Development.wasm:0x291566b)
at StandaloneInputModule_ProcessMouseEvent_m8A8214EB9286BA31C18F515BCC3349DF740B2BBA (Development.wasm:0x2914b38)
at StandaloneInputModule_ProcessMouseEvent_mCE1BA96E47D9A4448614CB9DAF5A406754F655DD (Development.wasm:0x29138f2)
LogErrorWithAdditionalInformation @ Development.framework.js:4503
_JS_CallAsLongAsNoExceptionsSeen @ Development.framework.js:4513
System information
- OS: Windows 10
- Browser: Chrome Version 135.0.7049.115 (Official Build) (64-bit)
- Version of supabase-js: Supabase (csharp) v1.1.1
- Version of Node.js: N/A
Additional context
A couple of links to Unity discussions that have similar error info although not necessarily as part of using Supabase. Adding in case they help.
One suggesting a DLL parameter binding issue: https://discussions.unity.com/t/webgl-runtime-error-null-function-or-function-signature-mismatch/1626888/3
One suggesting HTTP clients simply don't work in WebGL builds: https://discussions.unity.com/t/unitytls-get-nativeinterface-fails-in-webgl/1578017
Also I've tried a few of the suggested Unity settings options in the first link like 'Enable BigInt' to see if they resolve the issue but so far nothing has made any difference.

Activity
duane-nomad commentedon Apr 28, 2025
I just wanted to add that's it's difficult to be certain that this is an issue with using Supabase in Unity on the WebGL platform or whether the issue is something more fundamental with using HTTP clients in WebGL builds because information about this problem appears to be rather sparse.
Kind regards,
Duane
[-]Exception when running in a Unity WebGL build[/-][+]Runtime Error when authenticating with email and password in a Unity WebGL build[/+]