Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to verify assembly data; you must provide an authorization key when loading this assembly

Tags:

I'm testing the InteractiveConsole example in Unity. I did some configurations as described in the official tutorial. After some setups I got on step 7: Run our example code.

However, I'm receiving the following errors:

Unable to verify assembly data; you must provide an authorization key when loading this assembly. UnityEngine.Security:LoadAndVerifyAssembly(Byte[]) c__Iterator1:MoveNext() (at Assets/Facebook/Scripts/FB.cs:326)

Could not securely load assembly from https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_4.0/CanvasFacebook.dll UnityEngine.Debug:LogError(Object) FbDebug:Error(String) c__Iterator1:MoveNext() (at Assets/Facebook/Scripts/FB.cs:329)

Not sure what to do. Any ideas?

like image 798
user3118059 Avatar asked Feb 16 '14 17:02

user3118059


People also ask

Why create Assembly failed to execute?

sql server - CREATE ASSEMBLY failed because assembly failed verification. Check if the referenced assemblies are up-to-date and trusted to execute in the database - Stack Overflow

What to do if system componentmodel DataAnnotations failed verification?

CREATE ASSEMBLY for assembly 'System.ComponentModel.DataAnnotations' failed because assembly 'System.ComponentModel.DataAnnotations' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database.

Why can’t i load assembly ID 65536?

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues.

Why can't I trust the Assembly I'm running?

The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues.


2 Answers

Instead of change the call to LoadAndVerifyAssembly as @BrianJew suggests, you simply can change the line 381 of FB.cs, where it says

#if UNITY_4_5 

you should put

#if UNITY_4_5 || UNITY_4_6 

Or the appropiate flag for your Unity's version. In that block the key is obtained from this URL https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/key/sdk_5.1/AuthToken.unityhash

like image 140
RemeR Avatar answered Nov 15 '22 11:11

RemeR


Another simple fix:

Change line 411 of FB.cs to:

#if UNITY_4_5 || UNITY_EDITOR 

This has been tested in version 5.2.1.

like image 42
rhughes Avatar answered Nov 15 '22 11:11

rhughes