Sign In Register

How can we help you today?

Start a new topic

Build stripping breaks Unity plugin?


I'm having problems with the Unity plugin (testing on Android) when build stripping is enabled.

With stripping disabled, everything seems fine - but with it set to 'strip assemblies' or 'strip bytecode' (in Player Settings), the SDK is always in the 'not available' state. In the debug output, I get 'GS: HandleWebSocketOnError() ERROR The authentication or decryption has failed', and no requests seem to be succeeding.

This is happening in our game project, and test project, but it's also repeatable in a small test project  (basically the GameSparksTestUI scene with some additional test code).

I know that build stripping causes problems with at least one other networking-related Unity plug-in (see, and I'm aware that a link.xml can be created to control what is/isn't stripped - but I don't know what needs to go in there. Has this been seen before, has anybody created a link.xml to fix this?

I'm currently building with Unity 4.5.1p2 and I've tried running it on a couple of different devices with the same results (Nexus 7, Kindle Fire HD). I haven't tried it on iOS yet, but I wouldn't be surprised if there's a similar problem.


Dave Reed, Pixel Toys (on Alex's account)

I too would love to know what the solution is to this problem :)

Create a link.xml file in the root of your Unity assets folder, containing this:
	<!-- This fixes GameSparks 'ERROR: The authentication or decryption has failed' errors when stripping is enabled -->
 	<assembly fullname="mscorlib">
 		<type fullname="System.Security.Cryptography.*" preserve="all"/> 		 		 		
This solved it for us.  Took a good few hours to figure that one out - by comparing an stripped and unstripped build, adding all of the assemblies to the link.xml, and slowly narrowing it down to the one that was needed...

Dave Reed, Pixel Toys


I was having an error  {"error": "Timeout"} and it was because I build my game with Stripping Level, and this fix that error too.