- Home /
WWW.CheckSecurityOnHeaders throwing NullReferenceException
In upgrading to 4.3, Player.IO's previously-working SimpleGetCaptcha call now at runtime throws:
System.NullReferenceException: Object reference not set to an instance of an object at UnityEngine.WWW.CheckSecurityOnHeaders (System.String[] headers) [0x0010b] in C:\BuildAgent\work\d3d49558e4d408f4\Runtime\Export\WWW.cs:56 at UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Hashtable headers) [0x00018] in C:\BuildAgent\work\d3d49558e4d408f4\artifacts\EditorGenerated\Utils.cs:72 at PlayerIOClient.Internal.identifier5+identifier414.getRequest[identifier33] (Int32 method, identifier576 args) [0x00000] in :0 UnityEngine.Debug:LogError(Object) PlayerIOClient.Internal.identifier414:getRequest(Int32, identifier576) PlayerIOClient.Internal.identifier415:MoveNext() UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) PlayerIOClient.Internal.identifier414:Call(Int32, identifier33, Callback`1, Callback`1) PlayerIOClient.Internal.identifier5:SimpleGetCaptcha(String, Int32, Int32, Callback`1, Callback`1) PlayerIOClient.Internal.identifier519:SimpleGetCaptcha(String, Int32, Int32, Callback`1, Callback`1) SignupMenu:GetCaptcha() (at Assets/playerio/Scripts/SignupMenu.cs:249) SignupMenu:Init() (at Assets/playerio/Scripts/SignupMenu.cs:74) ClientManager:OnGUI() (at Assets/playerio/Scripts/ClientManager.cs:678) [...]
I'm apparently not the only one to encounter it, and it's somewhat crippling to our application. Did they try to add more strict WWW security checks in the latest update, and perhaps introduce a bug in the process?
I've just took a look into the method throwing exception. It's new in 4.3 and it is called if another method (`enforceWebSecurityRestrictions`) returns true. Unfortunately this method is external, so it's not possible to check what's going on inside.
Your problem is not exactly related to the question you linked. In the linked one, Unity throws an exception after checking specific condition. In your case, exception is unexpected and is probably a Unity bug.
I also updated to 4.3 and i am unable to connect to Player.IO. Getting following exceptions.
NullReferenceException: Object reference not set to an instance of an object UnityEngine.WWW.CheckSecurityOnHeaders (System.String[] headers) (at C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Export/WWW.cs:56) UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Hashtable headers) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/Utils.cs:72) PlayerIOClient.Internal.identifier5+identifier414.getRequest[identifier22] (Int32 method, identifier576 args) UnityEngine.$$anonymous$$onoBehaviour:StartCoroutine(IEnumerator) PlayerIOClient.Internal.identifier414:Call(Int32, identifier22, Callback`1, Callback`1) PlayerIOClient.Internal.identifier5:SimpleConnect(String, String, String, Callback`1, Callback`1) PlayerIOClient.Internal.identifier519:SimpleConnect(String, String, String, Callback`1, Callback`1)
This is not an answer - converting to comment.
I am having the exact same problem. This is only happening when using the web-player platform. Standalone and android work fine.
Note: Unity 4.3.0f4, latest player.io
same problem here. can't connect to player.io with webplayer since yesterday. Unity 4.1.5.
Looks like as of 4.3.4f1 it's still not fixed. FYI, Player.IO's FacebookOAuthConnect also has the same issue.
Answer by basti · Feb 19, 2014 at 07:28 AM
there is beta unity-api available (if you ask the people of player.io very nicely), which solves this issue (at least for us).
Can you post the link to download the new api for unity please?
There's no official link yet, as it's not openly released. P$$anonymous$$ me and I'll send it to you.
Hi blitzen! Sorry, I'm a little noob in this forum and I don't know how send P$$anonymous$$, can you send me with the link please? Thanks!
Please, anyone can send or publish the new api for player.io? It's the only one I need to publish my game please.